From f47df51791dfc1b3bda9cbd00f644894ba69c8ec Mon Sep 17 00:00:00 2001 From: Jian He Date: Wed, 3 Aug 2016 00:18:01 +0800 Subject: [PATCH 001/107] YARN-5461. Initial code ported from slider-core module. (jianhe) --- .../hadoop-yarn-slider-core/pom.xml | 397 + .../src/assembly/executable-jar.xml | 47 + .../src/license/THIRD-PARTY.properties | 33 + .../slider/server/avro/RoleHistoryRecord.avsc | 114 + .../apache/hadoop/security/KerberosDiags.java | 676 + .../main/java/org/apache/slider/Slider.java | 52 + .../apache/slider/api/ClusterDescription.java | 795 + .../slider/api/ClusterDescriptionKeys.java | 25 + .../api/ClusterDescriptionOperations.java | 93 + .../org/apache/slider/api/ClusterNode.java | 220 + .../org/apache/slider/api/InternalKeys.java | 199 + .../org/apache/slider/api/OptionKeys.java | 58 + .../org/apache/slider/api/ResourceKeys.java | 201 + .../java/org/apache/slider/api/RoleKeys.java | 116 + .../slider/api/SliderApplicationApi.java | 167 + .../slider/api/SliderClusterProtocol.java | 179 + .../org/apache/slider/api/StateValues.java | 53 + .../org/apache/slider/api/StatusKeys.java | 117 + .../org/apache/slider/api/proto/Messages.java | 34473 ++++++++++++++++ .../slider/api/proto/RestTypeMarshalling.java | 319 + .../slider/api/proto/SliderClusterAPI.java | 2293 + .../types/ApplicationLivenessInformation.java | 53 + .../api/types/ComponentInformation.java | 107 + .../api/types/ContainerInformation.java | 58 + .../api/types/NodeEntryInformation.java | 78 + .../slider/api/types/NodeInformation.java | 59 + .../slider/api/types/NodeInformationList.java | 41 + .../slider/api/types/PingInformation.java | 47 + .../slider/api/types/RoleStatistics.java | 66 + .../api/types/SliderInstanceDescription.java | 54 + .../slider/client/ClientRegistryBinder.java | 201 + .../org/apache/slider/client/ClientUtils.java | 111 + .../apache/slider/client/SliderClient.java | 4569 ++ .../apache/slider/client/SliderClientAPI.java | 368 + .../slider/client/SliderYarnClientImpl.java | 410 + .../apache/slider/client/TokensOperation.java | 109 + .../ipc/SliderApplicationIpcClient.java | 245 + .../client/ipc/SliderClusterOperations.java | 529 + .../slider/client/rest/BaseRestClient.java | 152 + .../slider/client/rest/RestClientFactory.java | 89 + .../rest/SliderApplicationApiRestClient.java | 326 + .../org/apache/slider/common/Constants.java | 35 + .../apache/slider/common/SliderExitCodes.java | 88 + .../org/apache/slider/common/SliderKeys.java | 278 + .../common/SliderXMLConfKeysForTesting.java | 83 + .../slider/common/SliderXmlConfKeys.java | 206 + .../common/params/AbstractActionArgs.java | 178 + .../common/params/AbstractArgsDelegate.java | 26 + .../AbstractClusterBuildingActionArgs.java | 217 + .../common/params/ActionAMSuicideArgs.java | 44 + .../slider/common/params/ActionBuildArgs.java | 32 + .../common/params/ActionClientArgs.java | 98 + .../common/params/ActionCreateArgs.java | 59 + .../common/params/ActionDependencyArgs.java | 65 + .../common/params/ActionDestroyArgs.java | 37 + .../common/params/ActionDiagnosticArgs.java | 73 + .../slider/common/params/ActionEchoArgs.java | 33 + .../common/params/ActionExistsArgs.java | 47 + .../slider/common/params/ActionFlexArgs.java | 54 + .../common/params/ActionFreezeArgs.java | 56 + .../slider/common/params/ActionHelpArgs.java | 51 + .../params/ActionInstallKeytabArgs.java | 57 + .../params/ActionInstallPackageArgs.java | 58 + .../slider/common/params/ActionKDiagArgs.java | 86 + .../common/params/ActionKeytabArgs.java | 81 + .../params/ActionKillContainerArgs.java | 37 + .../slider/common/params/ActionListArgs.java | 74 + .../common/params/ActionLookupArgs.java | 76 + .../slider/common/params/ActionNodesArgs.java | 71 + .../common/params/ActionPackageArgs.java | 81 + .../common/params/ActionRegistryArgs.java | 218 + .../common/params/ActionResolveArgs.java | 153 + .../common/params/ActionResourceArgs.java | 68 + .../common/params/ActionStatusArgs.java | 45 + .../slider/common/params/ActionThawArgs.java | 61 + .../common/params/ActionTokensArgs.java | 78 + .../common/params/ActionUpdateArgs.java | 32 + .../common/params/ActionUpgradeArgs.java | 73 + .../common/params/ActionVersionArgs.java | 46 + .../common/params/AddonArgsDelegate.java | 54 + .../AppAndResouceOptionArgsDelegate.java | 111 + .../apache/slider/common/params/ArgOps.java | 157 + .../slider/common/params/Arguments.java | 162 + .../slider/common/params/ClientArgs.java | 385 + .../slider/common/params/CommonArgs.java | 303 + .../common/params/ComponentArgsDelegate.java | 52 + .../common/params/DontSplitArguments.java | 34 + .../common/params/LaunchArgsAccessor.java | 30 + .../common/params/LaunchArgsDelegate.java | 51 + .../common/params/PathArgumentConverter.java | 34 + .../slider/common/params/SliderAMArgs.java | 57 + .../common/params/SliderAMCreateAction.java | 74 + .../slider/common/params/SliderActions.java | 113 + .../common/params/URIArgumentConverter.java | 40 + .../common/params/URLArgumentConverter.java | 40 + .../common/params/WaitArgsDelegate.java | 42 + .../common/params/WaitTimeAccessor.java | 24 + .../slider/common/tools/Comparators.java | 69 + .../slider/common/tools/ConfigHelper.java | 658 + .../slider/common/tools/CoreFileSystem.java | 915 + .../apache/slider/common/tools/Duration.java | 109 + .../slider/common/tools/PortScanner.java | 113 + .../slider/common/tools/SliderFileSystem.java | 42 + .../slider/common/tools/SliderUtils.java | 2548 ++ .../common/tools/SliderVersionInfo.java | 108 + .../AbstractInputPropertiesValidator.java | 49 + .../slider/core/conf/AggregateConf.java | 198 + .../org/apache/slider/core/conf/ConfTree.java | 114 + .../slider/core/conf/ConfTreeOperations.java | 477 + .../core/conf/InputPropertiesValidator.java | 27 + .../slider/core/conf/MapOperations.java | 344 + .../ResourcesInputPropertiesValidator.java | 41 + .../TemplateInputPropertiesValidator.java | 38 + .../exceptions/BadClusterStateException.java | 35 + .../BadCommandArgumentsException.java | 30 + .../core/exceptions/BadConfigException.java | 39 + .../slider/core/exceptions/ErrorStrings.java | 57 + .../core/exceptions/ExceptionConverter.java | 128 + .../core/exceptions/NoSuchNodeException.java | 32 + .../core/exceptions/NotFoundException.java | 35 + .../exceptions/ServiceNotReadyException.java | 43 + .../core/exceptions/SliderException.java | 67 + .../SliderInternalStateException.java | 34 + .../TriggerClusterTeardownException.java | 41 + .../UnknownApplicationInstanceException.java | 51 + .../core/exceptions/UsageException.java | 34 + .../core/exceptions/WaitTimeoutException.java | 34 + .../slider/core/launch/AbstractLauncher.java | 528 + .../slider/core/launch/AppMasterLauncher.java | 233 + .../core/launch/ClasspathConstructor.java | 172 + .../core/launch/CommandLineBuilder.java | 104 + .../slider/core/launch/ContainerLauncher.java | 72 + .../slider/core/launch/CredentialUtils.java | 379 + .../core/launch/JavaCommandLineBuilder.java | 182 + .../core/launch/LaunchedApplication.java | 108 + .../core/launch/RunningApplication.java | 76 + .../launch/SerializedApplicationReport.java | 98 + .../slider/core/main/ExitCodeProvider.java | 32 + .../apache/slider/core/main/IrqHandler.java | 103 + .../slider/core/main/LauncherExitCodes.java | 196 + .../apache/slider/core/main/RunService.java | 62 + .../core/main/ServiceLaunchException.java | 73 + .../slider/core/main/ServiceLauncher.java | 642 + .../slider/core/main/ServiceShutdownHook.java | 80 + .../core/persist/AggregateConfSerDeser.java | 55 + .../core/persist/AppDefinitionPersister.java | 260 + .../persist/ApplicationReportSerDeser.java | 57 + .../slider/core/persist/ConfPersister.java | 286 + .../slider/core/persist/ConfTreeSerDeser.java | 54 + .../apache/slider/core/persist/Filenames.java | 28 + .../slider/core/persist/InstancePaths.java | 58 + .../slider/core/persist/JsonSerDeser.java | 243 + .../persist/LockAcquireFailedException.java | 40 + .../slider/core/persist/LockHeldAction.java | 38 + .../slider/core/persist/PersistKeys.java | 25 + .../core/registry/SliderRegistryUtils.java | 62 + .../core/registry/YarnAppListClient.java | 189 + .../core/registry/docstore/ConfigFormat.java | 60 + .../core/registry/docstore/ConfigUtils.java | 96 + .../docstore/ConfigurationResolver.java | 24 + .../core/registry/docstore/ExportEntry.java | 120 + .../registry/docstore/PublishedConfigSet.java | 100 + .../docstore/PublishedConfiguration.java | 196 + .../PublishedConfigurationOutputter.java | 210 + .../registry/docstore/PublishedExports.java | 140 + .../docstore/PublishedExportsOutputter.java | 104 + .../docstore/PublishedExportsSet.java | 98 + .../slider/core/registry/docstore/UriMap.java | 38 + .../info/CustomRegistryConstants.java | 57 + .../core/registry/retrieve/AMWebClient.java | 158 + .../registry/retrieve/RegistryRetriever.java | 183 + .../restclient/HttpOperationResponse.java | 34 + .../slider/core/restclient/HttpVerb.java | 57 + .../SliderURLConnectionFactory.java | 176 + .../core/restclient/UgiJerseyBinding.java | 154 + .../restclient/UrlConnectionOperations.java | 210 + .../slider/core/zk/BlockingZKWatcher.java | 67 + .../slider/core/zk/MiniZooKeeperCluster.java | 423 + .../org/apache/slider/core/zk/ZKCallback.java | 31 + .../apache/slider/core/zk/ZKIntegration.java | 323 + .../apache/slider/core/zk/ZKPathBuilder.java | 82 + .../apache/slider/core/zk/ZookeeperUtils.java | 147 + .../providers/AbstractClientProvider.java | 248 + .../providers/AbstractProviderService.java | 424 + .../slider/providers/MonitorDetail.java | 43 + .../slider/providers/PlacementPolicy.java | 64 + .../providers/PlacementPolicyOptions.java | 26 + .../slider/providers/ProviderCompleted.java | 29 + .../providers/ProviderCompletedCallable.java | 38 + .../apache/slider/providers/ProviderCore.java | 43 + .../apache/slider/providers/ProviderRole.java | 135 + .../slider/providers/ProviderService.java | 217 + .../slider/providers/ProviderUtils.java | 530 + .../providers/SliderProviderFactory.java | 110 + .../providers/agent/AgentClientProvider.java | 701 + .../slider/providers/agent/AgentKeys.java | 109 + .../providers/agent/AgentLaunchParameter.java | 130 + .../providers/agent/AgentProviderFactory.java | 47 + .../providers/agent/AgentProviderService.java | 3212 ++ .../slider/providers/agent/AgentRoles.java | 38 + .../slider/providers/agent/AgentUtils.java | 134 + .../slider/providers/agent/Command.java | 59 + .../slider/providers/agent/CommandResult.java | 40 + .../agent/ComponentCommandOrder.java | 181 + .../agent/ComponentInstanceState.java | 340 + .../providers/agent/ComponentTagProvider.java | 127 + .../providers/agent/ContainerState.java | 41 + .../providers/agent/HeartbeatMonitor.java | 130 + .../apache/slider/providers/agent/State.java | 199 + .../metadata/AbstractComponent.java | 80 + .../metadata/AbstractMetainfoParser.java | 130 + .../metadata/AbstractMetainfoSchema.java | 69 + .../metadata/AddonPackageMetainfoParser.java | 53 + .../application/metadata/Application.java | 193 + .../metadata/ApplicationPackage.java | 69 + .../application/metadata/CommandOrder.java | 61 + .../application/metadata/CommandScript.java | 72 + .../agent/application/metadata/Component.java | 217 + .../metadata/ComponentCommand.java | 85 + .../application/metadata/ComponentExport.java | 54 + .../metadata/ComponentsInAddonPackage.java | 26 + .../application/metadata/ConfigFile.java | 59 + .../application/metadata/DefaultConfig.java | 39 + .../metadata/DefaultConfigParser.java | 54 + .../application/metadata/DockerContainer.java | 187 + .../metadata/DockerContainerInputFile.java | 50 + .../metadata/DockerContainerMount.java | 60 + .../metadata/DockerContainerPort.java | 66 + .../agent/application/metadata/Export.java | 61 + .../application/metadata/ExportGroup.java | 71 + .../agent/application/metadata/Metainfo.java | 118 + .../application/metadata/MetainfoParser.java | 97 + .../agent/application/metadata/OSPackage.java | 51 + .../application/metadata/OSSpecific.java | 57 + .../agent/application/metadata/Package.java | 60 + .../application/metadata/PropertyInfo.java | 54 + .../agent/application/metadata/Validate.java | 27 + .../org/apache/slider/providers/agent/todo.md | 22 + .../slideram/SliderAMClientProvider.java | 304 + .../slideram/SliderAMProviderService.java | 189 + .../appmaster/AppMasterActionOperations.java | 29 + .../appmaster/PrivilegedConnectToCM.java | 48 + .../appmaster/ProtobufClusterServices.java | 36 + .../server/appmaster/PublishedArtifacts.java | 31 + .../server/appmaster/RoleLaunchService.java | 257 + .../server/appmaster/SliderAppMaster.java | 2450 ++ .../appmaster/actions/ActionFlexCluster.java | 44 + .../server/appmaster/actions/ActionHalt.java | 53 + .../actions/ActionKillContainer.java | 86 + .../ActionRegisterServiceInstance.java | 59 + .../actions/ActionStartContainer.java | 62 + .../appmaster/actions/ActionStopQueue.java | 56 + .../appmaster/actions/ActionStopSlider.java | 162 + .../actions/ActionUpgradeContainers.java | 106 + .../server/appmaster/actions/AsyncAction.java | 138 + .../actions/EscalateOutstandingRequests.java | 45 + .../ProviderReportedContainerLoss.java | 53 + .../actions/ProviderStartupCompleted.java | 36 + .../server/appmaster/actions/QueueAccess.java | 72 + .../appmaster/actions/QueueExecutor.java | 90 + .../appmaster/actions/QueueService.java | 202 + .../actions/RegisterComponentInstance.java | 59 + .../appmaster/actions/RenewingAction.java | 141 + .../appmaster/actions/ResetFailureWindow.java | 39 + .../actions/ReviewAndFlexApplicationSize.java | 43 + .../actions/UnregisterComponentInstance.java | 51 + .../appmaster/management/BoolMetric.java | 87 + .../management/BoolMetricPredicate.java | 44 + .../appmaster/management/LongGauge.java | 98 + .../management/LongMetricFunction.java | 44 + .../appmaster/management/MeterAndCounter.java | 109 + .../management/MetricsAndMonitoring.java | 195 + .../management/MetricsBindingService.java | 151 + .../management/MetricsConstants.java | 58 + .../appmaster/management/MetricsKeys.java | 92 + .../management/PrefixedMetricsSet.java | 53 + .../management/RangeLimitedCounter.java | 85 + .../appmaster/management/RecordedEvent.java | 58 + .../appmaster/management/Timestamp.java | 33 + .../management/YarnServiceHealthCheck.java | 38 + .../server/appmaster/monkey/ChaosEntry.java | 85 + .../server/appmaster/monkey/ChaosKillAM.java | 48 + .../appmaster/monkey/ChaosKillContainer.java | 84 + .../appmaster/monkey/ChaosMonkeyService.java | 138 + .../server/appmaster/monkey/ChaosTarget.java | 24 + .../appmaster/monkey/MonkeyPlayAction.java | 48 + .../operations/AbstractRMOperation.java | 30 + .../operations/AsyncRMOperationHandler.java | 110 + .../operations/CancelSingleRequest.java | 54 + .../operations/ContainerReleaseOperation.java | 47 + .../operations/ContainerRequestOperation.java | 62 + .../ProviderNotifyingOperationHandler.java | 55 + .../operations/RMOperationHandler.java | 32 + .../operations/RMOperationHandlerActions.java | 60 + .../server/appmaster/rpc/RpcBinder.java | 310 + .../appmaster/rpc/SliderAMPolicyProvider.java | 41 + .../rpc/SliderClusterProtocolPB.java | 27 + .../rpc/SliderClusterProtocolPBImpl.java | 318 + .../rpc/SliderClusterProtocolProxy.java | 358 + .../appmaster/rpc/SliderIPCService.java | 551 + .../appmaster/rpc/SliderRPCSecurityInfo.java | 87 + .../security/SecurityConfiguration.java | 162 + .../state/AbstractClusterServices.java | 61 + .../server/appmaster/state/AppState.java | 2489 ++ .../appmaster/state/AppStateBindingInfo.java | 63 + .../state/ContainerAllocationOutcome.java | 44 + .../state/ContainerAllocationResults.java | 50 + .../appmaster/state/ContainerAssignment.java | 60 + .../appmaster/state/ContainerOutcome.java | 61 + .../appmaster/state/ContainerPriority.java | 109 + .../state/ContainerReleaseSelector.java | 37 + .../MostRecentContainerReleaseSelector.java | 51 + .../server/appmaster/state/NodeEntry.java | 325 + .../server/appmaster/state/NodeInstance.java | 409 + .../server/appmaster/state/NodeMap.java | 174 + .../appmaster/state/OutstandingRequest.java | 428 + .../state/OutstandingRequestTracker.java | 482 + .../appmaster/state/ProviderAppState.java | 307 + .../server/appmaster/state/RoleHistory.java | 1101 + .../appmaster/state/RoleHistoryUtils.java | 50 + .../appmaster/state/RoleHostnamePair.java | 75 + .../server/appmaster/state/RoleInstance.java | 323 + .../server/appmaster/state/RoleStatus.java | 563 + .../state/SimpleReleaseSelector.java | 33 + .../state/StateAccessForProviders.java | 313 + .../server/appmaster/web/AgentService.java | 37 + .../appmaster/web/HttpCacheHeaders.java | 35 + .../appmaster/web/SliderAMController.java | 69 + .../server/appmaster/web/SliderAMWebApp.java | 108 + .../web/SliderDefaultWrapperServlet.java | 48 + .../server/appmaster/web/WebAppApi.java | 95 + .../server/appmaster/web/WebAppApiImpl.java | 128 + .../appmaster/web/layout/AppLayout.java | 32 + .../web/layout/ClusterSpecificationView.java | 32 + .../web/layout/ContainerStatsView.java | 33 + .../appmaster/web/layout/WebUILayout.java | 43 + .../appmaster/web/rest/AMWadlGenerator.java | 72 + .../web/rest/AMWadlGeneratorConfig.java | 34 + .../appmaster/web/rest/AMWebServices.java | 72 + .../web/rest/AbstractSliderResource.java | 157 + .../appmaster/web/rest/InsecureAmFilter.java | 105 + .../web/rest/InsecureAmFilterInitializer.java | 102 + .../server/appmaster/web/rest/RestPaths.java | 172 + .../rest/SliderJacksonJaxbJsonProvider.java | 58 + .../web/rest/agent/AgentCommandType.java | 23 + .../appmaster/web/rest/agent/AgentEnv.java | 376 + .../web/rest/agent/AgentResource.java | 118 + .../web/rest/agent/AgentRestOperations.java | 28 + .../appmaster/web/rest/agent/AgentWebApp.java | 258 + .../web/rest/agent/AgentWebServices.java | 40 + .../web/rest/agent/CommandReport.java | 207 + .../web/rest/agent/ComponentStatus.java | 129 + .../appmaster/web/rest/agent/DiskInfo.java | 128 + .../web/rest/agent/ExecutionCommand.java | 310 + .../appmaster/web/rest/agent/HeartBeat.java | 149 + .../web/rest/agent/HeartBeatResponse.java | 147 + .../appmaster/web/rest/agent/HostInfo.java | 398 + .../appmaster/web/rest/agent/HostStatus.java | 63 + .../appmaster/web/rest/agent/Register.java | 193 + .../web/rest/agent/RegistrationCommand.java | 43 + .../web/rest/agent/RegistrationResponse.java | 133 + .../web/rest/agent/RegistrationStatus.java | 22 + .../web/rest/agent/StatusCommand.java | 152 + ...ApplicationResouceContentCacheFactory.java | 63 + .../rest/application/ApplicationResource.java | 516 + .../application/actions/RestActionPing.java | 50 + .../application/actions/RestActionStop.java | 67 + .../application/actions/StopResponse.java | 29 + .../web/rest/application/package-info.java | 24 + .../resources/AggregateModelRefresher.java | 47 + .../resources/AppconfRefresher.java | 55 + .../application/resources/CachedContent.java | 121 + .../application/resources/ContentCache.java | 67 + .../resources/LiveComponentsRefresher.java | 39 + .../resources/LiveContainersRefresher.java | 52 + .../resources/LiveNodesRefresher.java | 41 + .../resources/LiveResourcesRefresher.java | 68 + .../resources/LiveStatisticsRefresher.java | 39 + .../resources/ResourceRefresher.java | 31 + .../resources/ResourceSnapshotRefresher.java | 40 + .../rest/management/ManagementResource.java | 93 + .../management/resources/ActionsResource.java | 22 + .../resources/AggregateConfResource.java | 90 + .../resources/ComponentResource.java | 53 + .../resources/ConfTreeResource.java | 69 + .../management/resources/ResourceFactory.java | 47 + .../web/rest/publisher/PublisherResource.java | 273 + .../web/rest/registry/PathEntryResource.java | 45 + .../web/rest/registry/RegistryResource.java | 151 + .../web/view/ClusterSpecificationBlock.java | 55 + .../web/view/ContainerStatsBlock.java | 282 + .../server/appmaster/web/view/IndexBlock.java | 305 + .../server/appmaster/web/view/NavBlock.java | 62 + .../appmaster/web/view/SliderHamletBlock.java | 56 + .../slider/server/avro/LoadedRoleHistory.java | 92 + .../slider/server/avro/NewerFilesFirst.java | 43 + .../slider/server/avro/OlderFilesFirst.java | 43 + .../slider/server/avro/RoleHistoryWriter.java | 449 + .../server/servicemonitor/HttpProbe.java | 82 + .../servicemonitor/LogEntryBuilder.java | 76 + .../server/servicemonitor/MonitorKeys.java | 279 + .../server/servicemonitor/MonitorUtils.java | 109 + .../server/servicemonitor/PortProbe.java | 107 + .../slider/server/servicemonitor/Probe.java | 107 + .../servicemonitor/ProbeFailedException.java | 32 + .../ProbeInterruptedException.java | 29 + .../server/servicemonitor/ProbePhase.java | 56 + .../servicemonitor/ProbeReportHandler.java | 79 + .../server/servicemonitor/ProbeStatus.java | 173 + .../server/servicemonitor/ProbeWorker.java | 446 + .../server/servicemonitor/ReportingLoop.java | 265 + .../servicemonitor/YarnApplicationProbe.java | 90 + .../AbstractSecurityStoreGenerator.java | 98 + .../services/security/CertificateManager.java | 495 + .../services/security/KeystoreGenerator.java | 64 + .../services/security/SecurityStore.java | 66 + .../security/SecurityStoreGenerator.java | 40 + .../services/security/SecurityUtils.java | 256 + .../services/security/SignCertResponse.java | 67 + .../server/services/security/SignMessage.java | 54 + .../services/security/StoresGenerator.java | 68 + .../security/TruststoreGenerator.java | 62 + .../AbstractSliderLaunchedService.java | 120 + .../services/utility/EndOfServiceWaiter.java | 87 + .../LaunchedWorkflowCompositeService.java | 117 + .../services/utility/PatternValidator.java | 61 + .../services/utility/WebAppService.java | 69 + .../services/workflow/ClosingService.java | 94 + .../workflow/ForkedProcessService.java | 301 + .../services/workflow/LongLivedProcess.java | 598 + .../LongLivedProcessLifecycleEvent.java | 41 + .../services/workflow/ServiceParent.java | 44 + .../workflow/ServiceTerminatingCallable.java | 92 + .../workflow/ServiceTerminatingRunnable.java | 72 + .../workflow/ServiceThreadFactory.java | 102 + .../workflow/WorkflowCallbackService.java | 113 + .../workflow/WorkflowCompositeService.java | 167 + .../workflow/WorkflowExecutorService.java | 113 + .../services/workflow/WorkflowRpcService.java | 76 + .../WorkflowScheduledExecutorService.java | 38 + .../workflow/WorkflowSequenceService.java | 306 + .../services/workflow/package-info.java | 172 + .../YarnRegistryViewForProviders.java | 270 + .../main/proto/SliderClusterMessages.proto | 396 + .../main/proto/SliderClusterProtocol.proto | 184 + .../org.apache.hadoop.security.SecurityInfo | 15 + .../org/apache/slider/log4j.properties | 52 + .../slider/providers/agent/conf/agent.txt | 19 + .../slider/providers/agent/conf/command.json | 168 + .../agent/conf/command_template.json | 168 + .../slider/providers/agent/role-node.xml | 65 + .../providers/dynamic/application.properties | 25 + .../providers/slideram/instance/appconf.json | 19 + .../providers/slideram/instance/internal.json | 17 + .../slideram/instance/resources.json | 18 + .../resources/org/apache/slider/slider.xml | 30 + .../src/scripts/slider_keytabs.sh | 67 + .../src/scripts/yarnservice.py | 383 + .../hadoop-yarn-slider-core/src/site/site.xml | 26 + .../hadoop-yarn-slider/pom.xml | 39 + .../hadoop-yarn-applications/pom.xml | 2 + 461 files changed, 109486 insertions(+) create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/assembly/executable-jar.xml create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/license/THIRD-PARTY.properties create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/avro/org/apache/slider/server/avro/RoleHistoryRecord.avsc create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/Slider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescription.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescriptionKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescriptionOperations.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterNode.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/InternalKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/OptionKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ResourceKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/RoleKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/SliderApplicationApi.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/SliderClusterProtocol.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/StateValues.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/StatusKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/Messages.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/RestTypeMarshalling.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/SliderClusterAPI.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ApplicationLivenessInformation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ComponentInformation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ContainerInformation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeEntryInformation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeInformation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeInformationList.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/PingInformation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/RoleStatistics.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/SliderInstanceDescription.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ClientRegistryBinder.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ClientUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderClient.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderClientAPI.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/TokensOperation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ipc/SliderApplicationIpcClient.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ipc/SliderClusterOperations.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/BaseRestClient.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/RestClientFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/SliderApplicationApiRestClient.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/Constants.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderExitCodes.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderXMLConfKeysForTesting.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractArgsDelegate.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionAMSuicideArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionBuildArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionClientArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionCreateArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDependencyArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDestroyArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDiagnosticArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionEchoArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionExistsArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionFlexArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionFreezeArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionHelpArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionInstallKeytabArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionInstallPackageArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKDiagArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKeytabArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKillContainerArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionListArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionLookupArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionNodesArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionPackageArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionRegistryArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionResolveArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionResourceArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionStatusArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionThawArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionTokensArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionUpdateArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionUpgradeArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionVersionArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AddonArgsDelegate.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AppAndResouceOptionArgsDelegate.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ArgOps.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/Arguments.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ClientArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/CommonArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ComponentArgsDelegate.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/DontSplitArguments.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/LaunchArgsAccessor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/LaunchArgsDelegate.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/PathArgumentConverter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/SliderAMArgs.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/SliderAMCreateAction.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/SliderActions.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/URIArgumentConverter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/URLArgumentConverter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/WaitArgsDelegate.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/WaitTimeAccessor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/tools/Comparators.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/tools/ConfigHelper.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/tools/CoreFileSystem.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/tools/Duration.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/tools/PortScanner.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/tools/SliderFileSystem.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/tools/SliderVersionInfo.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/conf/AbstractInputPropertiesValidator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/conf/AggregateConf.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/conf/ConfTree.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/conf/ConfTreeOperations.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/conf/InputPropertiesValidator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/conf/MapOperations.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/conf/ResourcesInputPropertiesValidator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/conf/TemplateInputPropertiesValidator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/BadClusterStateException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/BadCommandArgumentsException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/BadConfigException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/ErrorStrings.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/ExceptionConverter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/NoSuchNodeException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/NotFoundException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/ServiceNotReadyException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/SliderException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/SliderInternalStateException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/TriggerClusterTeardownException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/UnknownApplicationInstanceException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/UsageException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/exceptions/WaitTimeoutException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/AbstractLauncher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/AppMasterLauncher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/ClasspathConstructor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/CommandLineBuilder.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/ContainerLauncher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/CredentialUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/JavaCommandLineBuilder.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/LaunchedApplication.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/RunningApplication.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/launch/SerializedApplicationReport.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/main/ExitCodeProvider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/main/IrqHandler.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/main/LauncherExitCodes.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/main/RunService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/main/ServiceLaunchException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/main/ServiceLauncher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/main/ServiceShutdownHook.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/AggregateConfSerDeser.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/AppDefinitionPersister.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/ApplicationReportSerDeser.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/ConfPersister.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/ConfTreeSerDeser.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/Filenames.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/InstancePaths.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/JsonSerDeser.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/LockAcquireFailedException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/LockHeldAction.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/persist/PersistKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/SliderRegistryUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/YarnAppListClient.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/ConfigFormat.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/ConfigUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/ConfigurationResolver.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/ExportEntry.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigSet.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfiguration.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedConfigurationOutputter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExports.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExportsOutputter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/PublishedExportsSet.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/docstore/UriMap.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/info/CustomRegistryConstants.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/retrieve/AMWebClient.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/registry/retrieve/RegistryRetriever.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/restclient/HttpOperationResponse.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/restclient/HttpVerb.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/restclient/SliderURLConnectionFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/restclient/UgiJerseyBinding.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/restclient/UrlConnectionOperations.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/zk/BlockingZKWatcher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/zk/MiniZooKeeperCluster.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/zk/ZKCallback.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/zk/ZKIntegration.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/zk/ZKPathBuilder.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/core/zk/ZookeeperUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/AbstractClientProvider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/AbstractProviderService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/MonitorDetail.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/PlacementPolicy.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/PlacementPolicyOptions.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/ProviderCompleted.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/ProviderCompletedCallable.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/ProviderCore.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/ProviderRole.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/ProviderService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/ProviderUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/SliderProviderFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/AgentClientProvider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/AgentKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/AgentLaunchParameter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/AgentProviderService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/AgentRoles.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/AgentUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/Command.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/CommandResult.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/ComponentCommandOrder.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/ComponentInstanceState.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/ComponentTagProvider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/ContainerState.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/HeartbeatMonitor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/State.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/AbstractComponent.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/AbstractMetainfoParser.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/AbstractMetainfoSchema.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/AddonPackageMetainfoParser.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Application.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ApplicationPackage.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/CommandOrder.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/CommandScript.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Component.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentCommand.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentExport.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ComponentsInAddonPackage.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ConfigFile.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfig.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DefaultConfigParser.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainer.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerInputFile.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerMount.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/DockerContainerPort.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Export.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/ExportGroup.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Metainfo.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/MetainfoParser.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSPackage.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/OSSpecific.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Package.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/PropertyInfo.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/application/metadata/Validate.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/agent/todo.md create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMClientProvider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/providers/slideram/SliderAMProviderService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/AppMasterActionOperations.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/PrivilegedConnectToCM.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/ProtobufClusterServices.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/PublishedArtifacts.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/RoleLaunchService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ActionFlexCluster.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ActionHalt.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ActionKillContainer.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ActionRegisterServiceInstance.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ActionStartContainer.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ActionStopQueue.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ActionStopSlider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ActionUpgradeContainers.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/AsyncAction.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/EscalateOutstandingRequests.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ProviderReportedContainerLoss.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ProviderStartupCompleted.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/QueueAccess.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/QueueExecutor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/QueueService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/RegisterComponentInstance.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/RenewingAction.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ResetFailureWindow.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/ReviewAndFlexApplicationSize.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/actions/UnregisterComponentInstance.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/BoolMetric.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/BoolMetricPredicate.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/LongGauge.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/LongMetricFunction.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/MeterAndCounter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/MetricsAndMonitoring.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/MetricsBindingService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/MetricsConstants.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/MetricsKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/PrefixedMetricsSet.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/RangeLimitedCounter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/RecordedEvent.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/Timestamp.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/management/YarnServiceHealthCheck.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosEntry.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosKillAM.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosKillContainer.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosTarget.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/MonkeyPlayAction.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/operations/AbstractRMOperation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/operations/AsyncRMOperationHandler.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/operations/CancelSingleRequest.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/operations/ContainerReleaseOperation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/operations/ContainerRequestOperation.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/operations/ProviderNotifyingOperationHandler.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/operations/RMOperationHandler.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/operations/RMOperationHandlerActions.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/rpc/RpcBinder.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/rpc/SliderAMPolicyProvider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/rpc/SliderClusterProtocolPB.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/rpc/SliderClusterProtocolPBImpl.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/rpc/SliderClusterProtocolProxy.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/rpc/SliderIPCService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/rpc/SliderRPCSecurityInfo.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/security/SecurityConfiguration.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/AbstractClusterServices.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/AppState.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/AppStateBindingInfo.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerAllocationOutcome.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerAllocationResults.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerAssignment.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerOutcome.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerPriority.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/ContainerReleaseSelector.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/MostRecentContainerReleaseSelector.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/NodeEntry.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/NodeInstance.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/NodeMap.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequestTracker.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/ProviderAppState.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistoryUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHostnamePair.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleInstance.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleStatus.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/SimpleReleaseSelector.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/state/StateAccessForProviders.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/AgentService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/HttpCacheHeaders.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderAMController.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderAMWebApp.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/SliderDefaultWrapperServlet.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/WebAppApi.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/WebAppApiImpl.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/layout/AppLayout.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/layout/ClusterSpecificationView.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/layout/ContainerStatsView.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/layout/WebUILayout.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AMWadlGenerator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AMWadlGeneratorConfig.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AMWebServices.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/AbstractSliderResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/InsecureAmFilter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/InsecureAmFilterInitializer.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/RestPaths.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/SliderJacksonJaxbJsonProvider.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/AgentCommandType.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/AgentEnv.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/AgentResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/AgentRestOperations.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/AgentWebApp.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/AgentWebServices.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/CommandReport.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/ComponentStatus.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/DiskInfo.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/ExecutionCommand.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/HeartBeat.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/HeartBeatResponse.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/HostInfo.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/HostStatus.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/Register.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/RegistrationCommand.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/RegistrationResponse.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/RegistrationStatus.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/agent/StatusCommand.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/ApplicationResouceContentCacheFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/ApplicationResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/actions/RestActionPing.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/actions/RestActionStop.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/actions/StopResponse.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/package-info.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/AggregateModelRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/AppconfRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/CachedContent.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/ContentCache.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/LiveComponentsRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/LiveContainersRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/LiveNodesRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/LiveResourcesRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/LiveStatisticsRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/ResourceRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/application/resources/ResourceSnapshotRefresher.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/ManagementResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/resources/ActionsResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/resources/AggregateConfResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/resources/ComponentResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/resources/ConfTreeResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/management/resources/ResourceFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/publisher/PublisherResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/registry/PathEntryResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/rest/registry/RegistryResource.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/view/ClusterSpecificationBlock.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/view/ContainerStatsBlock.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/view/IndexBlock.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/view/NavBlock.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/appmaster/web/view/SliderHamletBlock.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/avro/LoadedRoleHistory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/avro/NewerFilesFirst.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/avro/OlderFilesFirst.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/avro/RoleHistoryWriter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/HttpProbe.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/LogEntryBuilder.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/MonitorKeys.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/MonitorUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/PortProbe.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/Probe.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/ProbeFailedException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/ProbeInterruptedException.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/ProbePhase.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/ProbeReportHandler.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/ProbeStatus.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/ProbeWorker.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/ReportingLoop.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/servicemonitor/YarnApplicationProbe.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/AbstractSecurityStoreGenerator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/CertificateManager.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/KeystoreGenerator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/SecurityStore.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/SecurityStoreGenerator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/SecurityUtils.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/SignCertResponse.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/SignMessage.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/StoresGenerator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/security/TruststoreGenerator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/utility/AbstractSliderLaunchedService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/utility/EndOfServiceWaiter.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/utility/LaunchedWorkflowCompositeService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/utility/PatternValidator.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/utility/WebAppService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/ClosingService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/ForkedProcessService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcessLifecycleEvent.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceParent.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceTerminatingCallable.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceTerminatingRunnable.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceThreadFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowCallbackService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowCompositeService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowExecutorService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowRpcService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowScheduledExecutorService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowSequenceService.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/workflow/package-info.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/server/services/yarnregistry/YarnRegistryViewForProviders.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/proto/SliderClusterMessages.proto create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/proto/SliderClusterProtocol.proto create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/log4j.properties create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/providers/agent/conf/agent.txt create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/providers/agent/conf/command.json create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/providers/agent/conf/command_template.json create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/providers/agent/role-node.xml create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/providers/dynamic/application.properties create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/providers/slideram/instance/appconf.json create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/providers/slideram/instance/internal.json create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/providers/slideram/instance/resources.json create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/resources/org/apache/slider/slider.xml create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/scripts/slider_keytabs.sh create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/scripts/yarnservice.py create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/site/site.xml create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/pom.xml diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml new file mode 100644 index 00000000000..14130c53ecd --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/pom.xml @@ -0,0 +1,397 @@ + + + 4.0.0 + + org.apache.hadoop + hadoop-yarn-applications + 3.0.0-alpha2-SNAPSHOT + + org.apache.hadoop + hadoop-yarn-slider-core + jar + Apache Hadoop YARN Slider Core + + + + + + src/main/resources + true + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${java.home} + + + + + + org.apache.avro + avro-maven-plugin + ${avro.version} + + + generate-sources + + schema + + + ${project.basedir}/src/main/avro/ + + ${project.build.directory}/generated-sources/java + + + + + + + + + + + com.beust + jcommander + 1.30 + + + + org.slf4j + slf4j-api + + + + log4j + log4j + runtime + + + + com.google.guava + guava + + + + org.codehaus.jackson + jackson-core-asl + compile + + + + org.codehaus.jackson + jackson-jaxrs + compile + + + + org.codehaus.jackson + jackson-mapper-asl + compile + + + + org.codehaus.jackson + jackson-xc + compile + + + + org.apache.hadoop + hadoop-hdfs + + + + org.apache.hadoop + hadoop-yarn-client + compile + + + + org.apache.hadoop + hadoop-yarn-server-web-proxy + compile + + + + org.apache.hadoop + hadoop-yarn-registry + compile + + + + junit + junit + test + + + + com.google.protobuf + protobuf-java + + + + org.apache.avro + avro + + + + org.apache.commons + commons-compress + + + + commons-digester + commons-digester + 1.8 + + + + commons-io + commons-io + + + + commons-lang + commons-lang + + + + commons-logging + commons-logging + + + + com.codahale.metrics + metrics-core + + + + com.codahale.metrics + metrics-servlets + 3.0.1 + + + + + + + + org.apache.zookeeper + zookeeper + + + + + + + + javax.servlet + servlet-api + + + + javax.xml.bind + jaxb-api + + + + com.sun.jersey + jersey-client + + + + com.sun.jersey + jersey-json + + + + com.sun.jersey + jersey-server + + + + com.google.inject + guice + + + + com.google.code.gson + gson + + + + com.google.inject.extensions + guice-servlet + + + + com.sun.jersey.contribs + jersey-guice + + + + org.mockito + mockito-all + test + + + + org.mortbay.jetty + jetty + + + + org.mortbay.jetty + jetty-util + + + + org.mortbay.jetty + jetty-sslengine + + + + javax.servlet.jsp + jsp-api + runtime + + + + org.codehaus.jettison + jettison + + + org.mortbay.jetty + jetty-sslengine + 6.1.26 + + + + org.yaml + snakeyaml + 1.16 + compile + + + + + + + + compile-protobuf + + + + org.apache.hadoop + hadoop-maven-plugins + + + compile-protoc + generate-sources + + protoc + + + ${protobuf.version} + protoc + + ${basedir}/src/main/proto + + + ${basedir}/src/main/proto + + SliderClusterMessages.proto + SliderClusterProtocol.proto + + + ${basedir}/src/main/java + + + + + + + + + + + rat + + + + + org.apache.rat + apache-rat-plugin + + + check-licenses + + check + + + + + + **/*.json + src/test/python/agent.ini + src/test/python/version + **/THIRD-PARTY.properties + src/main/resources/webapps/slideram/.keep + src/main/resources/webapps/slideragent/.keep + src/main/resources/webapps/static/yarn.dt.plugins.js + + src/main/resources/webapps/static/dt-1.9.4/** + + src/main/resources/webapps/static/jquery/jquery-1.8.2.min.js + + src/main/resources/webapps/static/jquery/jquery-ui-1.9.1.custom.min.js + src/main/resources/webapps/static/jquery/themes-1.9.1/base/jquery-ui.css + + src/main/resources/webapps/static/jt/jquery.jstree.js + + src/main/java/org/apache/slider/api/proto/Messages.java + src/main/java/org/apache/slider/api/proto/SliderClusterAPI.java + src/test/app_packages/test_am_config/resources/test.template + src/test/app_packages/test_am_config/test_archive/testfile + + + + + + + + + + diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/assembly/executable-jar.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/assembly/executable-jar.xml new file mode 100644 index 00000000000..23383c852e9 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/assembly/executable-jar.xml @@ -0,0 +1,47 @@ + + + + distribution + + zip + + true + + + ${project.build.directory} + / + + *.jar + + + + + + runtime + /lib + + false + + false + + + \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/license/THIRD-PARTY.properties b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/license/THIRD-PARTY.properties new file mode 100644 index 00000000000..1abd56e327a --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/license/THIRD-PARTY.properties @@ -0,0 +1,33 @@ +# Generated by org.codehaus.mojo.license.AddThirdPartyMojo +#------------------------------------------------------------------------------- +# Already used licenses in project : +# - Apache License +# - BSD +# - CDDL + GPLv2 with classpath exception +# - CDDL 1.1 +# - CDDL License +# - CDDL+GPL +# - Common Public License Version 1.0 +# - Eclipse Public License - Version 1.0 +# - GNU Lesser General Public License (LGPL), Version 2.1 +# - GNU Lesser General Public License, Version 2.1 +# - GPL2 w/ CPE +# - MIT License +# - MPL 1.1 +# - New BSD License +# - Public Domain +# - Revised BSD +# - The Apache Software License, Version 2.0 +# - The BSD 3-Clause License +# - The BSD License +# - The MIT License +#------------------------------------------------------------------------------- +# Please fill the missing licenses for dependencies : +# +# +#Thu Oct 15 16:45:02 EDT 2015 +commons-beanutils--commons-beanutils--1.7.0=The Apache Software License, Version 2.0 +javax.servlet--servlet-api--2.5=CDDL License +javax.servlet.jsp--jsp-api--2.1=CDDL License +org.apache.zookeeper--zookeeper--3.4.6=The Apache Software License, Version 2.0 +org.codehaus.jettison--jettison--1.1=The Apache Software License, Version 2.0 diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/avro/org/apache/slider/server/avro/RoleHistoryRecord.avsc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/avro/org/apache/slider/server/avro/RoleHistoryRecord.avsc new file mode 100644 index 00000000000..3667c011502 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/avro/org/apache/slider/server/avro/RoleHistoryRecord.avsc @@ -0,0 +1,114 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF 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 License for the specific language governing permissions and +// limitations under the License. + +[ + + { + "type": "record", + "name": "NodeEntryRecord", + "namespace": "org.apache.slider.server.avro", + "fields": [ + { + "name": "host", + "type": "string" + }, + { + "name": "role", + "type": "int" + }, + { + "name": "active", + "type": "boolean" + }, + { + "name": "last_used", + "type": "long" + } + ] + }, + + { + "type": "record", + "name": "RoleHistoryHeader", + "namespace": "org.apache.slider.server.avro", + "fields": [ + { + "name": "version", + "type": "int" + }, + { + "name": "saved", + "type": "long" + }, + { + "name": "savedx", + "type": "string" + }, + { + "name": "savedate", + "type": "string", + "default": "" + }, + { + "name": "roles", + "type": "int" + } + ] + }, + { + "type": "record", + "name": "RoleHistoryMapping", + "namespace": "org.apache.slider.server.avro", + "fields": [ + { + "name": "rolemap", + "type": { + "type": "map", + "values": "int" + } + } + ] + }, + { + "type": "record", + "name": "RoleHistoryFooter", + "namespace": "org.apache.slider.server.avro", + "fields": [ + { + "name": "count", + "type": "long" + } + ] + }, + + { + "type": "record", + "name": "RoleHistoryRecord", + "namespace": "org.apache.slider.server.avro", + "fields": [ + { + "name": "entry", + "type": [ + "org.apache.slider.server.avro.NodeEntryRecord", + "org.apache.slider.server.avro.RoleHistoryHeader", + "org.apache.slider.server.avro.RoleHistoryFooter", + "org.apache.slider.server.avro.RoleHistoryMapping" + ] + } + ] + } + +] diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java new file mode 100644 index 00000000000..8c572b33260 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/hadoop/security/KerberosDiags.java @@ -0,0 +1,676 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.security; + +import com.google.common.annotations.VisibleForTesting; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.io.Text; +import org.apache.hadoop.security.token.Token; +import org.apache.hadoop.security.token.TokenIdentifier; +import org.apache.hadoop.util.ExitUtil; +import org.apache.hadoop.util.Shell; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.crypto.Cipher; +import java.io.Closeable; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.net.InetAddress; +import java.security.NoSuchAlgorithmException; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.regex.Pattern; + +import static org.apache.hadoop.security.UserGroupInformation.*; +import static org.apache.hadoop.security.authentication.util.KerberosUtil.*; +import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.*; + +/** + * Kerberos diagnostics + * At some point this may move to hadoop core, so please keep use of slider + * methods and classes to ~0. + * + * This operation expands some of the diagnostic output of the security code, + * but not all. For completeness + * + * Set the environment variable {@code HADOOP_JAAS_DEBUG=true} + * Set the log level for {@code org.apache.hadoop.security=DEBUG} + */ +public class KerberosDiags implements Closeable { + + private static final Logger LOG = LoggerFactory.getLogger(KerberosDiags.class); + public static final String KRB5_CCNAME = "KRB5CCNAME"; + public static final String JAVA_SECURITY_KRB5_CONF + = "java.security.krb5.conf"; + public static final String JAVA_SECURITY_KRB5_REALM + = "java.security.krb5.realm"; + public static final String SUN_SECURITY_KRB5_DEBUG + = "sun.security.krb5.debug"; + public static final String SUN_SECURITY_SPNEGO_DEBUG + = "sun.security.spnego.debug"; + public static final String SUN_SECURITY_JAAS_FILE + = "java.security.auth.login.config"; + public static final String KERBEROS_KINIT_COMMAND + = "hadoop.kerberos.kinit.command"; + public static final String HADOOP_AUTHENTICATION_IS_DISABLED + = "Hadoop authentication is disabled"; + public static final String UNSET = "(unset)"; + public static final String NO_DEFAULT_REALM = "Cannot locate default realm"; + + private final Configuration conf; + private final List services; + private final PrintWriter out; + private final File keytab; + private final String principal; + private final long minKeyLength; + private final boolean securityRequired; + + public static final String CAT_JVM = "JVM"; + public static final String CAT_JAAS = "JAAS"; + public static final String CAT_CONFIG = "CONFIG"; + public static final String CAT_LOGIN = "LOGIN"; + public static final String CAT_KERBEROS = "KERBEROS"; + public static final String CAT_SASL = "SASL"; + + @SuppressWarnings("IOResourceOpenedButNotSafelyClosed") + public KerberosDiags(Configuration conf, + PrintWriter out, + List services, + File keytab, + String principal, + long minKeyLength, + boolean securityRequired) { + this.conf = conf; + this.services = services; + this.keytab = keytab; + this.principal = principal; + this.out = out; + this.minKeyLength = minKeyLength; + this.securityRequired = securityRequired; + } + + @Override + public void close() throws IOException { + flush(); + } + + /** + * Execute diagnostics. + *

+ * Things it would be nice if UGI made accessible + *

    + *
  1. A way to enable JAAS debug programatically
  2. + *
  3. Access to the TGT
  4. + *
+ * @return true if security was enabled and all probes were successful + * @throws KerberosDiagsFailure explicitly raised failure + * @throws Exception other security problems + */ + @SuppressWarnings("deprecation") + public boolean execute() throws Exception { + + title("Kerberos Diagnostics scan at %s", + new Date(System.currentTimeMillis())); + + // check that the machine has a name + println("Hostname: %s", + InetAddress.getLocalHost().getCanonicalHostName()); + + // Fail fast on a JVM without JCE installed. + validateKeyLength(); + + // look at realm + println("JVM Kerberos Login Module = %s", getKrb5LoginModuleName()); + printDefaultRealm(); + + title("System Properties"); + for (String prop : new String[]{ + JAVA_SECURITY_KRB5_CONF, + JAVA_SECURITY_KRB5_REALM, + SUN_SECURITY_KRB5_DEBUG, + SUN_SECURITY_SPNEGO_DEBUG, + SUN_SECURITY_JAAS_FILE + }) { + printSysprop(prop); + } + + title("Environment Variables"); + for (String env : new String[]{ + "HADOOP_JAAS_DEBUG", + KRB5_CCNAME, + HADOOP_USER_NAME, + HADOOP_PROXY_USER, + HADOOP_TOKEN_FILE_LOCATION, + }) { + printEnv(env); + } + + for (String prop : new String[]{ + KERBEROS_KINIT_COMMAND, + HADOOP_SECURITY_AUTHENTICATION, + HADOOP_SECURITY_AUTHORIZATION, + "hadoop.kerberos.min.seconds.before.relogin", // not in 2.6 + "hadoop.security.dns.interface", // not in 2.6 + "hadoop.security.dns.nameserver", // not in 2.6 + HADOOP_RPC_PROTECTION, + HADOOP_SECURITY_SASL_PROPS_RESOLVER_CLASS, + HADOOP_SECURITY_CRYPTO_CODEC_CLASSES_KEY_PREFIX, + HADOOP_SECURITY_GROUP_MAPPING, + "hadoop.security.impersonation.provider.class", // not in 2.6 + "dfs.data.transfer.protection" // HDFS + }) { + printConfOpt(prop); + } + + // check that authentication is enabled + if (SecurityUtil.getAuthenticationMethod(conf) + .equals(AuthenticationMethod.SIMPLE)) { + println(HADOOP_AUTHENTICATION_IS_DISABLED); + failif(securityRequired, CAT_CONFIG, HADOOP_AUTHENTICATION_IS_DISABLED); + // no security, skip rest of test + return false; + } + + validateKrb5File(); + validateSasl(HADOOP_SECURITY_SASL_PROPS_RESOLVER_CLASS); + validateSasl("dfs.data.transfer.saslproperties.resolver.class"); + validateKinitExecutable(); + validateJAAS(); + // now the big test: login, then try again + boolean krb5Debug = getAndSet(SUN_SECURITY_KRB5_DEBUG); + boolean spnegoDebug = getAndSet(SUN_SECURITY_SPNEGO_DEBUG); + try { + title("Logging in"); + + if (keytab != null) { + dumpKeytab(keytab); + loginFromKeytab(); + } else { + UserGroupInformation loginUser = getLoginUser(); + dumpUGI("Log in user", loginUser); + validateUGI("Login user", loginUser); + println("Ticket based login: %b", isLoginTicketBased()); + println("Keytab based login: %b", isLoginKeytabBased()); + } + + return true; + } finally { + // restore original system properties + System.setProperty(SUN_SECURITY_KRB5_DEBUG, + Boolean.toString(krb5Debug)); + System.setProperty(SUN_SECURITY_SPNEGO_DEBUG, + Boolean.toString(spnegoDebug)); + } + } + + /** + * Fail fast on a JVM without JCE installed. + * + * This is a recurrent problem + * (that is: it keeps creeping back with JVM updates); + * a fast failure is the best tactic + * @throws NoSuchAlgorithmException + */ + + protected void validateKeyLength() throws NoSuchAlgorithmException { + int aesLen = Cipher.getMaxAllowedKeyLength("AES"); + println("Maximum AES encryption key length %d bits", aesLen); + failif (aesLen < minKeyLength, + CAT_JVM, + "Java Cryptography Extensions are not installed on this JVM." + +" Maximum supported key length %s - minimum required %d", + aesLen, minKeyLength); + } + + /** + * Get the default realm. + *

+ * Not having a default realm may be harmless, so is noted at info. + * All other invocation failures are downgraded to warn, as + * follow-on actions may still work. + * failure to invoke the method via introspection is rejected, + * as it's a sign of JVM compatibility issues that may have other + * consequences + */ + protected void printDefaultRealm() { + try { + println("Default Realm = %s", + getDefaultRealm()); + } catch (ClassNotFoundException + | IllegalAccessException + | NoSuchMethodException e) { + + throw new KerberosDiagsFailure(CAT_JVM, e, + "Failed to invoke krb5.Config.getDefaultRealm: %s", e); + } catch (InvocationTargetException e) { + Throwable cause = e.getCause() != null ? e.getCause() : e; + if (cause.toString().contains(NO_DEFAULT_REALM)) { + // exception raised if there is no default realm. This is not + // always a problem, so downgrade to a message. + println("Host has no default realm"); + LOG.debug(cause.toString(), cause); + } else { + println("Kerberos.getDefaultRealm() failed: %s\n%s", + cause, + org.apache.hadoop.util.StringUtils.stringifyException(cause)); + } + } + } + + /** + * Locate the krb5.conf file and dump it. + * No-op on windows. + * @throws IOException + */ + private void validateKrb5File() throws IOException { + if (!Shell.WINDOWS) { + title("Locating Kerberos configuration file"); + String krbPath = "/etc/krb5.conf"; + String jvmKrbPath = System.getProperty(JAVA_SECURITY_KRB5_CONF); + if (jvmKrbPath != null) { + println("Setting kerberos path from sysprop %s: %s", + JAVA_SECURITY_KRB5_CONF, jvmKrbPath); + krbPath = jvmKrbPath; + } + + String krb5name = System.getenv(KRB5_CCNAME); + if (krb5name != null) { + println("Setting kerberos path from environment variable %s: %s", + KRB5_CCNAME, krb5name); + krbPath = krb5name; + if (jvmKrbPath != null) { + println("Warning - both %s and %s were set - %s takes priority", + JAVA_SECURITY_KRB5_CONF, KRB5_CCNAME, KRB5_CCNAME); + } + } + + File krbFile = new File(krbPath); + println("Kerberos configuration file = %s", krbFile); + failif(!krbFile.exists(), + CAT_KERBEROS, + "Kerberos configuration file %s not found", krbFile); + dump(krbFile); + } + } + + /** + * Dump a keytab: list all principals. + * @param keytabFile the keytab file + * @throws IOException IO problems + */ + public void dumpKeytab(File keytabFile) throws IOException { + title("Examining keytab %s", keytabFile); + File kt = keytabFile.getCanonicalFile(); + failif(!kt.exists(), CAT_CONFIG, "Keytab not found: %s", kt); + failif(!kt.isFile(), CAT_CONFIG, "Keytab is not a valid file: %s", kt); + + String[] names = getPrincipalNames(keytabFile.getCanonicalPath(), + Pattern.compile(".*")); + println("keytab entry count: %d", names.length); + for (String name : names) { + println(" %s", name); + } + println("-----"); + } + + /** + * Log in from a keytab, dump the UGI, validate it, then try and log in again. + * That second-time login catches JVM/Hadoop compatibility problems. + * @throws IOException + */ + private void loginFromKeytab() throws IOException { + UserGroupInformation ugi; + String identity; + if (keytab != null) { + File kt = keytab.getCanonicalFile(); + println("Using keytab %s principal %s", kt, principal); + identity = principal; + + failif(StringUtils.isEmpty(principal), CAT_KERBEROS, + "No principal defined"); + ugi = loginUserFromKeytabAndReturnUGI(principal, kt.getPath()); + dumpUGI(identity, ugi); + validateUGI(principal, ugi); + + title("Attempting to log in from keytab again"); + // package scoped -hence the reason why this class must be in the + // hadoop.security package + setShouldRenewImmediatelyForTests(true); + // attempt a new login + ugi.reloginFromKeytab(); + } else { + println("No keytab: logging is as current user"); + } + } + + /** + * Dump a UGI. + * @param title title of this section + * @param ugi UGI to dump + * @throws IOException + */ + private void dumpUGI(String title, UserGroupInformation ugi) + throws IOException { + title(title); + println("UGI instance = %s", ugi); + println("Has kerberos credentials: %b", ugi.hasKerberosCredentials()); + println("Authentication method: %s", ugi.getAuthenticationMethod()); + println("Real Authentication method: %s", + ugi.getRealAuthenticationMethod()); + title("Group names"); + for (String name : ugi.getGroupNames()) { + println(name); + } + title("Credentials"); + Credentials credentials = ugi.getCredentials(); + List secretKeys = credentials.getAllSecretKeys(); + title("Secret keys"); + if (!secretKeys.isEmpty()) { + for (Text secret: secretKeys) { + println("%s", secret); + } + } else { + println("(none)"); + } + + dumpTokens(ugi); + } + + /** + * Validate the UGI: verify it is kerberized. + * @param messagePrefix message in exceptions + * @param user user to validate + */ + private void validateUGI(String messagePrefix, UserGroupInformation user) { + failif(!user.hasKerberosCredentials(), + CAT_LOGIN, "%s: No kerberos credentials for %s", messagePrefix, user); + failif(user.getAuthenticationMethod() == null, + CAT_LOGIN, "%s: Null AuthenticationMethod for %s", messagePrefix, user); + } + + /** + * A cursory look at the {@code kinit} executable. + * If it is an absolute path: it must exist with a size > 0. + * If it is just a command, it has to be on the path. There's no check + * for that -but the PATH is printed out. + */ + private void validateKinitExecutable() { + String kinit = conf.getTrimmed(KERBEROS_KINIT_COMMAND, ""); + if (!kinit.isEmpty()) { + File kinitPath = new File(kinit); + println("%s = %s", KERBEROS_KINIT_COMMAND, kinitPath); + if (kinitPath.isAbsolute()) { + failif(!kinitPath.exists(), CAT_KERBEROS, + "%s executable does not exist: %s", + KERBEROS_KINIT_COMMAND, kinitPath); + failif(!kinitPath.isFile(), CAT_KERBEROS, + "%s path does not refer to a file: %s", + KERBEROS_KINIT_COMMAND, kinitPath); + failif(kinitPath.length() == 0, CAT_KERBEROS, + "%s file is empty: %s", + KERBEROS_KINIT_COMMAND, kinitPath); + } else { + println("Executable %s is relative -must be on the PATH", kinit); + printEnv("PATH"); + } + } + } + + /** + * Try to load the SASL resolver. + * @param saslPropsResolverKey key for the SASL resolver + */ + private void validateSasl(String saslPropsResolverKey) { + title("Resolving SASL property %s", saslPropsResolverKey); + String saslPropsResolver = conf.getTrimmed(saslPropsResolverKey); + try { + Class resolverClass = conf.getClass( + saslPropsResolverKey, + SaslPropertiesResolver.class, SaslPropertiesResolver.class); + println("Resolver is %s", resolverClass); + } catch (RuntimeException e) { + throw new KerberosDiagsFailure(CAT_SASL, e, + "Failed to load %s class %s", + saslPropsResolverKey, saslPropsResolver); + } + } + + /** + * Validate any JAAS entry referenced in the {@link #SUN_SECURITY_JAAS_FILE} + * property. + */ + private void validateJAAS() { + String jaasFilename = System.getProperty(SUN_SECURITY_JAAS_FILE); + if (jaasFilename != null) { + title("JAAS"); + File jaasFile = new File(jaasFilename); + println("JAAS file is defined in %s: %s", + SUN_SECURITY_JAAS_FILE, jaasFile); + failif(!jaasFile.exists(), CAT_JAAS, + "JAAS file does not exist: %s", jaasFile); + failif(!jaasFile.isFile(), CAT_JAAS, + "Specified JAAS file is not a file: %s", jaasFile); + } + } + + /** + * Dump all tokens of a user + * @param user user + */ + public void dumpTokens(UserGroupInformation user) { + Collection> tokens + = user.getCredentials().getAllTokens(); + title("Token Count: %d", tokens.size()); + for (Token token : tokens) { + println("Token %s", token.getKind()); + } + } + + /** + * Set the System property to true; return the old value for caching + * @param sysprop property + * @return the previous value + */ + private boolean getAndSet(String sysprop) { + boolean old = Boolean.getBoolean(sysprop); + System.setProperty(sysprop, "true"); + return old; + } + + /** + * Flush all active output channels, including {@Code System.err}, + * so as to stay in sync with any JRE log messages. + */ + private void flush() { + if (out != null) { + out.flush(); + } else { + System.out.flush(); + } + System.err.flush(); + } + + /** + * Format and print a line of output. + * This goes to any output file, or + * is logged at info. The output is flushed before and after, to + * try and stay in sync with JRE logging. + * @param format format string + * @param args any arguments + */ + @VisibleForTesting + public void println(String format, Object... args) { + println(format(format, args)); + } + + /** + * Print a line of output. This goes to any output file, or + * is logged at info. The output is flushed before and after, to + * try and stay in sync with JRE logging. + * @param msg message string + */ + @VisibleForTesting + private void println(String msg) { + flush(); + if (out != null) { + out.println(msg); + } else { + LOG.info(msg); + } + flush(); + } + + /** + * Print a title entry + * @param format format string + * @param args any arguments + */ + private void title(String format, Object... args) { + println(""); + println(""); + String msg = "== " + format(format, args) + " =="; + println(msg); + println(""); + } + + /** + * Print a system property, or {@link #UNSET} if unset. + * @param property property to print + */ + private void printSysprop(String property) { + println("%s = \"%s\"", property, + System.getProperty(property, UNSET)); + } + + /** + * Print a configuration option, or {@link #UNSET} if unset. + * @param option option to print + */ + private void printConfOpt(String option) { + println("%s = \"%s\"", option, conf.get(option, UNSET)); + } + + /** + * Print an environment variable's name and value; printing + * {@link #UNSET} if it is not set + * @param variable environment variable + */ + private void printEnv(String variable) { + String env = System.getenv(variable); + println("%s = \"%s\"", variable, env != null ? env : UNSET); + } + + /** + * Dump any file to standard out; add a trailing newline + * @param file file to dump + * @throws IOException IO problems + */ + public void dump(File file) throws IOException { + try (FileInputStream in = new FileInputStream(file)) { + for (String line : IOUtils.readLines(in)) { + println("%s", line); + } + } + println(""); + } + + /** + * Format and raise a failure + * + * @param category category for exception + * @param message string formatting message + * @param args any arguments for the formatting + * @throws KerberosDiagsFailure containing the formatted text + */ + private void fail(String category, String message, Object... args) + throws KerberosDiagsFailure { + throw new KerberosDiagsFailure(category, message, args); + } + + /** + * Conditional failure with string formatted arguments + * @param condition failure condition + * @param category category for exception + * @param message string formatting message + * @param args any arguments for the formatting + * @throws KerberosDiagsFailure containing the formatted text + * if the condition was met + */ + private void failif(boolean condition, + String category, + String message, + Object... args) + throws KerberosDiagsFailure { + if (condition) { + fail(category, message, args); + } + } + + /** + * Format a string, treating a call where there are no varags values + * as a string to pass through unformatted. + * @param message message, which is either a format string + args, or + * a general string + * @param args argument array + * @return a string for printing. + */ + public static String format(String message, Object... args) { + if (args.length == 0) { + return message; + } else { + return String.format(message, args); + } + } + + /** + * Diagnostics failures return the exit code 41, "unauthorized". + * + * They have a category, initially for testing: the category can be + * validated without having to match on the entire string. + */ + public static class KerberosDiagsFailure extends ExitUtil.ExitException { + private final String category; + + public KerberosDiagsFailure(String category, String message) { + super(41, category + ": " + message); + this.category = category; + } + + public KerberosDiagsFailure(String category, String message, Object... args) { + this(category, format(message, args)); + } + + public KerberosDiagsFailure(String category, Throwable throwable, + String message, Object... args) { + this(category, message, args); + initCause(throwable); + } + + public String getCategory() { + return category; + } + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/Slider.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/Slider.java new file mode 100644 index 00000000000..5fc86180c94 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/Slider.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider; + +import org.apache.slider.client.SliderClient; +import org.apache.slider.core.main.ServiceLauncher; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * This is just the entry point class + */ +public class Slider extends SliderClient { + + + public static final String SERVICE_CLASSNAME = "org.apache.slider.Slider"; + + /** + * This is the main entry point for the service launcher. + * @param args command line arguments. + */ + public static void main(String[] args) { + + //turn the args to a list + List argsList = Arrays.asList(args); + //create a new list, as the ArrayList type doesn't push() on an insert + List extendedArgs = new ArrayList(argsList); + //insert the service name + extendedArgs.add(0, SERVICE_CLASSNAME); + //now have the service launcher do its work + ServiceLauncher.serviceMain(extendedArgs); + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescription.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescription.java new file mode 100644 index 00000000000..f8e5e7cd8d7 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescription.java @@ -0,0 +1,795 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +import org.apache.hadoop.fs.FSDataInputStream; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.slider.api.types.ApplicationLivenessInformation; +import org.apache.slider.common.tools.SliderUtils; +import org.apache.slider.core.exceptions.BadConfigException; +import org.apache.slider.providers.SliderProviderFactory; +import org.codehaus.jackson.JsonGenerationException; +import org.codehaus.jackson.JsonParseException; +import org.codehaus.jackson.annotate.JsonIgnore; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.JsonMappingException; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.SerializationConfig; +import org.codehaus.jackson.map.annotate.JsonSerialize; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.DataOutputStream; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static org.apache.slider.api.OptionKeys.INTERNAL_APPLICATION_HOME; +import static org.apache.slider.api.OptionKeys.INTERNAL_APPLICATION_IMAGE_PATH; +import static org.apache.slider.api.OptionKeys.ZOOKEEPER_PATH; +import static org.apache.slider.api.OptionKeys.ZOOKEEPER_QUORUM; + +/** + * Represents a cluster specification; designed to be sendable over the wire + * and persisted in JSON by way of Jackson. + * + * When used in cluster status operations the info + * and statistics maps contain information about the cluster. + * + * As a wire format it is less efficient in both xfer and ser/deser than + * a binary format, but by having one unified format for wire and persistence, + * the code paths are simplified. + * + * This was the original single-file specification/model used in the Hoya + * precursor to Slider. Its now retained primarily as a way to publish + * the current state of the application, or at least a fraction thereof ... + * the larger set of information from the REST API is beyond the scope of + * this structure. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) + +public class ClusterDescription implements Cloneable { + protected static final Logger + log = LoggerFactory.getLogger(ClusterDescription.class); + + private static final String UTF_8 = "UTF-8"; + + /** + * version counter + */ + public String version = "1.0"; + + /** + * Name of the cluster + */ + public String name; + + /** + * Type of cluster + */ + public String type = SliderProviderFactory.DEFAULT_CLUSTER_TYPE; + + /** + * State of the cluster + */ + public int state; + + /* + State list for both clusters and nodes in them. Ordered so that destroyed follows + stopped. + + Some of the states are only used for recording + the persistent state of the cluster and are not + seen in node descriptions + */ + + /** + * Specification is incomplete & cannot + * be used: {@value} + */ + public static final int STATE_INCOMPLETE = StateValues.STATE_INCOMPLETE; + + /** + * Spec has been submitted: {@value} + */ + public static final int STATE_SUBMITTED = StateValues.STATE_SUBMITTED; + /** + * Cluster created: {@value} + */ + public static final int STATE_CREATED = StateValues.STATE_CREATED; + /** + * Live: {@value} + */ + public static final int STATE_LIVE = StateValues.STATE_LIVE; + /** + * Stopped + */ + public static final int STATE_STOPPED = StateValues.STATE_STOPPED; + /** + * destroyed + */ + public static final int STATE_DESTROYED = StateValues.STATE_DESTROYED; + + /** + * When was the cluster specification created? + * This is not the time a cluster was thawed; that will + * be in the info section. + */ + public long createTime; + + /** + * When was the cluster specification last updated + */ + public long updateTime; + + /** + * URL path to the original configuration + * files; these are re-read when + * restoring a cluster + */ + + public String originConfigurationPath; + + /** + * URL path to the generated configuration + */ + public String generatedConfigurationPath; + + /** + * This is where the data goes + */ + public String dataPath; + + /** + * cluster-specific options -to control both + * the Slider AM and the application that it deploys + */ + public Map options = new HashMap<>(); + + /** + * cluster information + * This is only valid when querying the cluster status. + */ + public Map info = new HashMap<>(); + + /** + * Statistics. This is only relevant when querying the cluster status + */ + public Map> statistics = new HashMap<>(); + + /** + * Instances: role->count + */ + public Map> instances = new HashMap<>(); + + /** + * Role options, + * role -> option -> value + */ + public Map> roles = new HashMap<>(); + + + /** + * List of key-value pairs to add to a client config to set up the client + */ + public Map clientProperties = new HashMap<>(); + + /** + * Status information + */ + public Map status; + + /** + * Liveness information; the same as returned + * on the live/liveness/ URL + */ + public ApplicationLivenessInformation liveness; + + /** + * Creator. + */ + public ClusterDescription() { + } + + @Override + public String toString() { + try { + return toJsonString(); + } catch (Exception e) { + log.debug("Failed to convert CD to JSON ", e); + return super.toString(); + } + } + + /** + * Shallow clone + * @return a shallow clone + * @throws CloneNotSupportedException + */ + @Override + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + /** + * A deep clone of the spec. This is done inefficiently with a ser/derser + * @return the cluster description + */ + public ClusterDescription deepClone() { + try { + return fromJson(toJsonString()); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + + /** + * Save a cluster description to a hadoop filesystem + * @param fs filesystem + * @param path path + * @param overwrite should any existing file be overwritten + * @throws IOException IO exception + */ + public void save(FileSystem fs, Path path, boolean overwrite) throws + IOException { + FSDataOutputStream dataOutputStream = fs.create(path, overwrite); + writeJsonAsBytes(dataOutputStream); + } + + /** + * Save a cluster description to the local filesystem + * @param file file + * @throws IOException IO excpetion + */ + public void save(File file) throws IOException { + log.debug("Saving to {}", file.getAbsolutePath()); + if (!file.getParentFile().mkdirs()) { + log.warn("Failed to mkdirs for {}", file.getParentFile()); + } + DataOutputStream dataOutputStream = new DataOutputStream(new FileOutputStream(file)); + writeJsonAsBytes(dataOutputStream); + } + + /** + * Write the json as bytes -then close the file + * @param dataOutputStream an outout stream that will always be closed + * @throws IOException any failure + */ + private void writeJsonAsBytes(DataOutputStream dataOutputStream) + throws IOException { + try { + String json = toJsonString(); + byte[] b = json.getBytes(UTF_8); + dataOutputStream.write(b); + } finally { + dataOutputStream.close(); + } + } + + /** + * Load from the filesystem + * @param fs filesystem + * @param path path + * @return a loaded CD + * @throws IOException IO problems + */ + public static ClusterDescription load(FileSystem fs, Path path) + throws IOException, JsonParseException, JsonMappingException { + FileStatus status = fs.getFileStatus(path); + byte[] b = new byte[(int) status.getLen()]; + FSDataInputStream dataInputStream = fs.open(path); + int count = dataInputStream.read(b); + String json = new String(b, 0, count, UTF_8); + return fromJson(json); + } + + /** + * Make a deep copy of the class + * @param source source + * @return the copy + */ + public static ClusterDescription copy(ClusterDescription source) { + //currently the copy is done by a generate/save. Inefficient but it goes + //down the tree nicely + try { + return fromJson(source.toJsonString()); + } catch (IOException e) { + throw new RuntimeException("ClusterDescription copy failed " + e, e); + } + } + + /** + * Convert to a JSON string + * @return a JSON string description + * @throws IOException Problems mapping/writing the object + */ + public String toJsonString() throws IOException, + JsonGenerationException, + JsonMappingException { + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true); + return mapper.writeValueAsString(this); + } + + /** + * Convert from JSON + * @param json input + * @return the parsed JSON + * @throws IOException IO + * @throws JsonMappingException failure to map from the JSON to this class + */ + public static ClusterDescription fromJson(String json) + throws IOException, JsonParseException, JsonMappingException { + ObjectMapper mapper = new ObjectMapper(); + try { + return mapper.readValue(json, ClusterDescription.class); + } catch (IOException e) { + log.error("Exception while parsing json : " + e + "\n" + json, e); + throw e; + } + } + + /** + * Convert from input stream + * @param is input stream of cluster description + * @return the parsed JSON + * @throws IOException IO + * @throws JsonMappingException failure to map from the JSON to this class + */ + public static ClusterDescription fromStream(InputStream is) + throws IOException, JsonParseException, JsonMappingException { + if (is==null) { + throw new FileNotFoundException("Empty Stream"); + } + ObjectMapper mapper = new ObjectMapper(); + try { + return mapper.readValue(is, ClusterDescription.class); + } catch (IOException e) { + log.error("Exception while parsing input stream : {}", e, e); + throw e; + } + } + + /** + * Convert from a JSON file + * @param jsonFile input file + * @return the parsed JSON + * @throws IOException IO problems + * @throws JsonMappingException failure to map from the JSON to this class + */ + public static ClusterDescription fromFile(File jsonFile) + throws IOException, JsonParseException, JsonMappingException { + ObjectMapper mapper = new ObjectMapper(); + try { + return mapper.readValue(jsonFile, ClusterDescription.class); + } catch (IOException e) { + log.error("Exception while parsing json file {}" , jsonFile, e); + throw e; + } + } + + /** + * Set a cluster option: a key val pair in the options {} section + * @param key key option name + * @param val value option value + */ + public void setOption(String key, String val) { + options.put(key, val); + } + + /** + * Set a cluster option if it is unset. If it is already set, + * in the Cluster Description, it is left alone + * @param key key key to query/set + * @param val value value + */ + + public void setOptionifUnset(String key, String val) { + if (options.get(key) == null) { + options.put(key, val); + } + } + + /** + * Set an integer option -it's converted to a string before saving + * @param option option name + * @param val integer value + */ + public void setOption(String option, int val) { + setOption(option, Integer.toString(val)); + } + + /** + * Set a boolean option + * @param option option name + * @param val bool value + */ + public void setOption(String option, boolean val) { + setOption(option, Boolean.toString(val)); + } + + /** + * Get a cluster option or value + * + * @param key option key + * @param defVal option val + * @return resolved value or default + */ + public String getOption(String key, String defVal) { + String val = options.get(key); + return val != null ? val : defVal; + } + + /** + * Get a cluster option or value + * + * @param key mandatory key + * @return the value + * @throws BadConfigException if the option is missing + */ + public String getMandatoryOption(String key) throws BadConfigException { + String val = options.get(key); + if (val == null) { + throw new BadConfigException("Missing option " + key); + } + return val; + } + + /** + * Get an integer option; use {@link Integer#decode(String)} so as to take hex + * oct and bin values too. + * + * @param option option name + * @param defVal default value + * @return parsed value + * @throws NumberFormatException if the role could not be parsed. + */ + public int getOptionInt(String option, int defVal) { + String val = getOption(option, Integer.toString(defVal)); + return Integer.decode(val); + } + + /** + * Verify that an option is set: that is defined AND non-empty + * @param key key to verify + * @throws BadConfigException + */ + public void verifyOptionSet(String key) throws BadConfigException { + if (SliderUtils.isUnset(getOption(key, null))) { + throw new BadConfigException("Unset cluster option %s", key); + } + } + + /** + * Get an option as a boolean. Note that {@link Boolean#valueOf(String)} + * is used for parsing -its policy of what is true vs false applies. + * @param option name + * @param defVal default + * @return the option. + */ + public boolean getOptionBool(String option, boolean defVal) { + return Boolean.valueOf(getOption(option, Boolean.toString(defVal))); + } + + /** + * Get a role option + * @param role role to get from + * @param option option name + * @param defVal default value + * @return resolved value + */ + public String getRoleOpt(String role, String option, String defVal) { + Map roleopts = getRole(role); + if (roleopts == null) { + return defVal; + } + String val = roleopts.get(option); + return val != null ? val : defVal; + } + + /** + * Get a mandatory role option + * @param role role to get from + * @param option option name + * @return resolved value + * @throws BadConfigException if the option is not defined + */ + public String getMandatoryRoleOpt(String role, String option) throws + BadConfigException { + Map roleopts = getRole(role); + if (roleopts == null) { + throw new BadConfigException("Missing role %s ", role); + } + String val = roleopts.get(option); + if (val == null) { + throw new BadConfigException("Missing option '%s' in role %s ", option, role); + } + return val; + } + + /** + * Get a mandatory integer role option + * @param role role to get from + * @param option option name + * @return resolved value + * @throws BadConfigException if the option is not defined + */ + public int getMandatoryRoleOptInt(String role, String option) + throws BadConfigException { + getMandatoryRoleOpt(role, option); + return getRoleOptInt(role, option, 0); + } + + /** + * look up a role and return its options + * @param role role + * @return role mapping or null + */ + public Map getRole(String role) { + return roles.get(role); + } + + /** + * Get a role -adding it to the roleopts map if + * none with that name exists + * @param role role + * @return role mapping + */ + public Map getOrAddRole(String role) { + Map map = getRole(role); + if (map == null) { + map = new HashMap<>(); + } + roles.put(role, map); + return map; + } + + /* + * return the Set of role names + */ + @JsonIgnore + public Set getRoleNames() { + return new HashSet<>(roles.keySet()); + } + + /** + * Get a role whose presence is mandatory + * @param role role name + * @return the mapping + * @throws BadConfigException if the role is not there + */ + public Map getMandatoryRole(String role) throws + BadConfigException { + Map roleOptions = getRole(role); + if (roleOptions == null) { + throw new BadConfigException("Missing role " + role); + } + return roleOptions; + } + + /** + * Get an integer role option; use {@link Integer#decode(String)} so as to take hex + * oct and bin values too. + * + * @param role role to get from + * @param option option name + * @param defVal default value + * @return parsed value + * @throws NumberFormatException if the role could not be parsed. + */ + public int getRoleOptInt(String role, String option, int defVal) { + String val = getRoleOpt(role, option, Integer.toString(defVal)); + return Integer.decode(val); + } + + /** + * Get an integer role option; use {@link Integer#decode(String)} so as to take hex + * oct and bin values too. + * + * @param role role to get from + * @param option option name + * @param defVal default value + * @return parsed value + * @throws NumberFormatException if the role could not be parsed. + */ + public long getRoleOptLong(String role, String option, long defVal) { + String val = getRoleOpt(role, option, Long.toString(defVal)); + return Long.decode(val); + } + + /** + * Set a role option, creating the role if necessary + * @param role role name + * @param option option name + * @param val value + */ + public void setRoleOpt(String role, String option, String val) { + Map roleopts = getOrAddRole(role); + roleopts.put(option, val); + } + + /** + * Set an integer role option, creating the role if necessary + * @param role role name + * @param option option name + * @param val integer value + */ + public void setRoleOpt(String role, String option, int val) { + setRoleOpt(role, option, Integer.toString(val)); + } + + /** + * Set a role option of any object, using its string value. + * This works for (Boxed) numeric values as well as other objects + * @param role role name + * @param option option name + * @param val non-null value + */ + public void setRoleOpt(String role, String option, Object val) { + setRoleOpt(role, option, val.toString()); + } + + /** + * Get the value of a role requirement (cores, RAM, etc). + * These are returned as integers, but there is special handling of the + * string {@link ResourceKeys#YARN_RESOURCE_MAX}, which triggers + * the return of the maximum value. + * @param role role to get from + * @param option option name + * @param defVal default value + * @param maxVal value to return if the max val is requested + * @return parsed value + * @throws NumberFormatException if the role could not be parsed. + */ + public int getRoleResourceRequirement(String role, String option, int defVal, int maxVal) { + String val = getRoleOpt(role, option, Integer.toString(defVal)); + Integer intVal; + if (ResourceKeys.YARN_RESOURCE_MAX.equals(val)) { + intVal = maxVal; + } else { + intVal = Integer.decode(val); + } + return intVal; + } + + + /** + * Set the time for an information (human, machine) timestamp pair of fields. + * The human time is the time in millis converted via the {@link Date} class. + * @param keyHumanTime name of human time key + * @param keyMachineTime name of machine time + * @param time timestamp + */ + + public void setInfoTime(String keyHumanTime, String keyMachineTime, long time) { + SliderUtils.setInfoTime(info, keyHumanTime, keyMachineTime, time); + } + + /** + * Set an information string. This is content that is only valid in status + * reports. + * @param key key + * @param value string value + */ + @JsonIgnore + public void setInfo(String key, String value) { + info.put(key, value); + } + + /** + * Get an information string. This is content that is only valid in status + * reports. + * @param key key + * @return the value or null + */ + @JsonIgnore + public String getInfo(String key) { + return info.get(key); + } + + /** + * Get an information string. This is content that is only valid in status + * reports. + * @param key key + * @return the value or null + */ + @JsonIgnore + public boolean getInfoBool(String key) { + String val = info.get(key); + if (val != null) { + return Boolean.valueOf(val); + } + return false; + } + + @JsonIgnore + public String getZkHosts() throws BadConfigException { + return getMandatoryOption(ZOOKEEPER_QUORUM); + } + + /** + * Set the hosts for the ZK quorum + * @param zkHosts a comma separated list of hosts + */ + @JsonIgnore + public void setZkHosts(String zkHosts) { + setOption(ZOOKEEPER_QUORUM, zkHosts); + } + + @JsonIgnore + public String getZkPath() throws BadConfigException { + return getMandatoryOption(ZOOKEEPER_PATH); + } + + @JsonIgnore + public void setZkPath(String zkPath) { + setOption(ZOOKEEPER_PATH, zkPath); + } + + /** + * HBase home: if non-empty defines where a copy of HBase is preinstalled + */ + @JsonIgnore + public String getApplicationHome() { + return getOption(INTERNAL_APPLICATION_HOME, ""); + } + + @JsonIgnore + public void setApplicationHome(String applicationHome) { + setOption(INTERNAL_APPLICATION_HOME, applicationHome); + } + + /** + * The path in HDFS where the HBase image is + */ + @JsonIgnore + public String getImagePath() { + return getOption(INTERNAL_APPLICATION_IMAGE_PATH, ""); + } + + /** + * Set the path in HDFS where the HBase image is + */ + @JsonIgnore + public void setImagePath(String imagePath) { + setOption(INTERNAL_APPLICATION_IMAGE_PATH, imagePath); + } + + /** + * Query for the image path being set (non null/non empty) + * @return true if there is a path in the image path option + */ + @JsonIgnore + public boolean isImagePathSet() { + return SliderUtils.isSet(getImagePath()); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescriptionKeys.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescriptionKeys.java new file mode 100644 index 00000000000..5b7a92a69c2 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescriptionKeys.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +public class ClusterDescriptionKeys { + + public static final String KEY_CLUSTER_LIVE = "live"; + public static final String KEY_CLUSTER_FAILED = "failed"; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescriptionOperations.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescriptionOperations.java new file mode 100644 index 00000000000..5b954143c38 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterDescriptionOperations.java @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +import org.apache.slider.common.tools.SliderUtils; +import org.apache.slider.core.conf.AggregateConf; +import org.apache.slider.core.conf.ConfTree; +import org.apache.slider.core.conf.MapOperations; +import org.apache.slider.core.exceptions.BadConfigException; +import org.apache.slider.providers.SliderProviderFactory; + +import java.util.Map; + +import static org.apache.slider.api.OptionKeys.ZOOKEEPER_PATH; +import static org.apache.slider.api.OptionKeys.ZOOKEEPER_QUORUM; + +/** + * Operations on Cluster Descriptions + */ +public class ClusterDescriptionOperations { + + + public static ClusterDescription buildFromInstanceDefinition(AggregateConf aggregateConf) throws + BadConfigException { + + ClusterDescription cd = new ClusterDescription(); + + aggregateConf.resolve(); + + //options are a merge of all globals + Map options = cd.options; + SliderUtils.mergeMapsIgnoreDuplicateKeys(options, + aggregateConf.getInternal().global); + SliderUtils.mergeMapsIgnoreDuplicateKeys(options, + aggregateConf.getAppConf().global); + SliderUtils.mergeMapsIgnoreDuplicateKeys(options, + aggregateConf.getResources().global); + + //roles are the role values merged in the same order + mergeInComponentMap(cd, aggregateConf.getInternal()); + mergeInComponentMap(cd, aggregateConf.getAppConf()); + mergeInComponentMap(cd, aggregateConf.getResources()); + + //now add the extra bits + cd.state = ClusterDescription.STATE_LIVE; + MapOperations internalOptions = + aggregateConf.getInternalOperations().getGlobalOptions(); + MapOperations appOptions = + aggregateConf.getAppConfOperations().getGlobalOptions(); + + cd.type = internalOptions.getOption(InternalKeys.INTERNAL_PROVIDER_NAME, + SliderProviderFactory.DEFAULT_CLUSTER_TYPE); + + cd.dataPath = internalOptions.get(InternalKeys.INTERNAL_DATA_DIR_PATH); + cd.name = internalOptions.get(OptionKeys.APPLICATION_NAME); + cd.originConfigurationPath = internalOptions.get(InternalKeys.INTERNAL_SNAPSHOT_CONF_PATH); + cd.generatedConfigurationPath = internalOptions.get(InternalKeys.INTERNAL_GENERATED_CONF_PATH); + cd.setImagePath(internalOptions.get(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH)); + cd.setApplicationHome(internalOptions.get(InternalKeys.INTERNAL_APPLICATION_HOME)); + cd.setZkPath(appOptions.get(ZOOKEEPER_PATH)); + cd.setZkHosts(appOptions.get(ZOOKEEPER_QUORUM)); + + return cd; + } + + private static void mergeInComponentMap(ClusterDescription cd, + ConfTree confTree) { + + Map> components = confTree.components; + for (Map.Entry> compEntry : components.entrySet()) { + String name = compEntry.getKey(); + Map destRole = cd.getOrAddRole(name); + Map sourceComponent = compEntry.getValue(); + SliderUtils.mergeMapsIgnoreDuplicateKeys(destRole, sourceComponent); + } + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterNode.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterNode.java new file mode 100644 index 00000000000..8b0a563117d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ClusterNode.java @@ -0,0 +1,220 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +import org.apache.hadoop.yarn.api.records.ContainerId; +import org.apache.slider.api.proto.Messages; +import org.codehaus.jackson.JsonParseException; +import org.codehaus.jackson.annotate.JsonIgnore; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.JsonMappingException; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.annotate.JsonSerialize; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; + +/** + * Describe a specific node in the cluster + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL ) +public final class ClusterNode implements Cloneable { + protected static final Logger + LOG = LoggerFactory.getLogger(ClusterNode.class); + + @JsonIgnore + public ContainerId containerId; + + /** + * server name + */ + public String name; + + + /** + * UUID of container used in Slider RPC to refer to instances + */ + public String id; + + public String role; + + public int roleId; + + public long createTime; + public long startTime; + /** + * flag set when it is released, to know if it has + * already been targeted for termination + */ + public boolean released; + public String host; + public String ip; + public String hostname; + public String hostUrl; + + /** + * state from {@link ClusterDescription} + */ + public int state; + + /** + * Exit code: only valid if the state >= STOPPED + */ + public int exitCode; + + /** + * what was the command executed? + */ + public String command; + + /** + * Any diagnostics + */ + public String diagnostics; + + /** + * What is the tail output from the executed process (or [] if not started + * or the log cannot be picked up + */ + public String[] output; + + /** + * Any environment details + */ + public String[] environment; + + /** + * server-side ctor takes the container ID and builds the name from it + * @param containerId container ID; can be null + */ + public ClusterNode(ContainerId containerId) { + if (containerId != null) { + this.containerId = containerId; + this.name = containerId.toString(); + } + } + + /** + * ctor for deserialization + */ + public ClusterNode() { + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append(name).append(": "); + builder.append(state).append("\n"); + builder.append("state: ").append(state).append("\n"); + builder.append("role: ").append(role).append("\n"); + append(builder, "host", host); + append(builder, "hostURL", hostUrl); + append(builder, "command", command); + if (output != null) { + for (String line : output) { + builder.append(line).append("\n"); + } + } + append(builder, "diagnostics", diagnostics); + return builder.toString(); + } + + private void append(StringBuilder builder, String key, Object val) { + if (val != null) { + builder.append(key).append(": ").append(val.toString()).append("\n"); + } + } + + /** + * Convert to a JSON string + * @return a JSON string description + * @throws IOException Problems mapping/writing the object + */ + public String toJsonString() throws IOException { + ObjectMapper mapper = new ObjectMapper(); + return mapper.writeValueAsString(this); + } + + + /** + * Convert from JSON + * @param json input + * @return the parsed JSON + * @throws IOException IO + */ + public static ClusterNode fromJson(String json) + throws IOException, JsonParseException, JsonMappingException { + ObjectMapper mapper = new ObjectMapper(); + try { + return mapper.readValue(json, ClusterNode.class); + } catch (IOException e) { + LOG.error("Exception while parsing json : {}\n{}", e , json, e); + throw e; + } + } + + /** + * Build from a protobuf response + * @param message + * @return the deserialized node + */ + public static ClusterNode fromProtobuf(Messages.RoleInstanceState message) { + ClusterNode node = new ClusterNode(); + node.name = message.getName(); + node.command = message.getCommand(); + node.diagnostics = message.getDiagnostics(); + String[] arr; + int environmentCount = message.getEnvironmentCount(); + if (environmentCount > 0) { + arr = new String[environmentCount]; + node.environment = message.getEnvironmentList().toArray(arr); + } + node.exitCode = message.getExitCode(); + int outputCount = message.getOutputCount(); + if (outputCount > 0) { + arr = new String[outputCount]; + node.output = message.getOutputList().toArray(arr); + } + node.role = message.getRole(); + node.roleId = message.getRoleId(); + node.state = message.getState(); + node.host = message.getHost(); + node.hostUrl = message.getHostURL(); + node.createTime = message.getCreateTime(); + node.startTime = message.getStartTime(); + node.released = message.getReleased(); + return node; + } + + @Override + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + public ClusterNode doClone() { + try { + return (ClusterNode)clone(); + } catch (CloneNotSupportedException e) { + //not going to happen. This is a final class + return null; + } + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/InternalKeys.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/InternalKeys.java new file mode 100644 index 00000000000..fcaaf0ec62b --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/InternalKeys.java @@ -0,0 +1,199 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +/** + * Keys for internal use, go into `internal.json` and not intended for normal + * use except when tuning Slider AM operations + */ +public interface InternalKeys { + + + /** + * Home dir of the app: {@value} + * If set, implies there is a home dir to use + */ + String INTERNAL_APPLICATION_HOME = "internal.application.home"; + /** + * Path to an image file containing the app: {@value} + */ + String INTERNAL_APPLICATION_IMAGE_PATH = "internal.application.image.path"; + /** + * Time in milliseconds to wait after forking any in-AM + * process before attempting to start up the containers: {@value} + * + * A shorter value brings the cluster up faster, but means that if the + * in AM process fails (due to a bad configuration), then time + * is wasted starting containers on a cluster that isn't going to come + * up + */ + String INTERNAL_CONTAINER_STARTUP_DELAY = "internal.container.startup.delay"; + /** + * internal temp directory: {@value} + */ + String INTERNAL_AM_TMP_DIR = "internal.am.tmp.dir"; + /** + * internal temp directory: {@value} + */ + String INTERNAL_TMP_DIR = "internal.tmp.dir"; + /** + * where a snapshot of the original conf dir is: {@value} + */ + String INTERNAL_SNAPSHOT_CONF_PATH = "internal.snapshot.conf.path"; + /** + * where a snapshot of the original conf dir is: {@value} + */ + String INTERNAL_GENERATED_CONF_PATH = "internal.generated.conf.path"; + /** + * where a snapshot of the original conf dir is: {@value} + */ + String INTERNAL_PROVIDER_NAME = "internal.provider.name"; + /** + * where a snapshot of the original conf dir is: {@value} + */ + String INTERNAL_DATA_DIR_PATH = "internal.data.dir.path"; + /** + * where the app def is stored + */ + String INTERNAL_APPDEF_DIR_PATH = "internal.appdef.dir.path"; + /** + * where addons for the app are stored + */ + String INTERNAL_ADDONS_DIR_PATH = "internal.addons.dir.path"; + /** + * Time in milliseconds to wait after forking any in-AM + * process before attempting to start up the containers: {@value} + * + * A shorter value brings the cluster up faster, but means that if the + * in AM process fails (due to a bad configuration), then time + * is wasted starting containers on a cluster that isn't going to come + * up + */ + int DEFAULT_INTERNAL_CONTAINER_STARTUP_DELAY = 5000; + /** + * Time in seconds before a container is considered long-lived. + * Shortlived containers are interpreted as a problem with the role + * and/or the host: {@value} + */ + String INTERNAL_CONTAINER_FAILURE_SHORTLIFE = + "internal.container.failure.shortlife"; + /** + * Default short life threshold: {@value} + */ + int DEFAULT_INTERNAL_CONTAINER_FAILURE_SHORTLIFE = 60; + + /** + * Version of the app: {@value} + */ + String KEYTAB_LOCATION = "internal.keytab.location"; + + /** + * Queue used to deploy the app: {@value} + */ + String INTERNAL_QUEUE = "internal.queue"; + + /** + * Flag to indicate whether or not the chaos monkey is enabled: + * {@value} + */ + String CHAOS_MONKEY_ENABLED = "internal.chaos.monkey.enabled"; + boolean DEFAULT_CHAOS_MONKEY_ENABLED = false; + + + /** + * Rate + */ + + String CHAOS_MONKEY_INTERVAL = "internal.chaos.monkey.interval"; + String CHAOS_MONKEY_INTERVAL_DAYS = CHAOS_MONKEY_INTERVAL + ".days"; + String CHAOS_MONKEY_INTERVAL_HOURS = CHAOS_MONKEY_INTERVAL + ".hours"; + String CHAOS_MONKEY_INTERVAL_MINUTES = CHAOS_MONKEY_INTERVAL + ".minutes"; + String CHAOS_MONKEY_INTERVAL_SECONDS = CHAOS_MONKEY_INTERVAL + ".seconds"; + + int DEFAULT_CHAOS_MONKEY_INTERVAL_DAYS = 0; + int DEFAULT_CHAOS_MONKEY_INTERVAL_HOURS = 0; + int DEFAULT_CHAOS_MONKEY_INTERVAL_MINUTES = 0; + + String CHAOS_MONKEY_DELAY = "internal.chaos.monkey.delay"; + String CHAOS_MONKEY_DELAY_DAYS = CHAOS_MONKEY_DELAY + ".days"; + String CHAOS_MONKEY_DELAY_HOURS = CHAOS_MONKEY_DELAY + ".hours"; + String CHAOS_MONKEY_DELAY_MINUTES = CHAOS_MONKEY_DELAY + ".minutes"; + String CHAOS_MONKEY_DELAY_SECONDS = CHAOS_MONKEY_DELAY + ".seconds"; + + int DEFAULT_CHAOS_MONKEY_STARTUP_DELAY = 0; + + /** + * Prefix for all chaos monkey probabilities + */ + String CHAOS_MONKEY_PROBABILITY = + "internal.chaos.monkey.probability"; + /** + * Probabilies are out of 10000 ; 100==1% + */ + + /** + * Probability of a monkey check killing the AM: {@value} + */ + String CHAOS_MONKEY_PROBABILITY_AM_FAILURE = + CHAOS_MONKEY_PROBABILITY + ".amfailure"; + + /** + * Default probability of a monkey check killing the AM: {@value} + */ + int DEFAULT_CHAOS_MONKEY_PROBABILITY_AM_FAILURE = 0; + + /** + * Probability of a monkey check killing the AM: {@value} + */ + String CHAOS_MONKEY_PROBABILITY_AM_LAUNCH_FAILURE = + CHAOS_MONKEY_PROBABILITY + ".amlaunchfailure"; + + /** + * Probability of a monkey check killing a container: {@value} + */ + + String CHAOS_MONKEY_PROBABILITY_CONTAINER_FAILURE = + CHAOS_MONKEY_PROBABILITY + ".containerfailure"; + + /** + * Default probability of a monkey check killing the a container: {@value} + */ + int DEFAULT_CHAOS_MONKEY_PROBABILITY_CONTAINER_FAILURE = 0; + + + /** + * 1% of chaos + */ + int PROBABILITY_PERCENT_1 = 100; + + /** + * 100% for chaos values + */ + int PROBABILITY_PERCENT_100 = 100 * PROBABILITY_PERCENT_1; + + /** + * interval between checks for escalation: {@value} + */ + String ESCALATION_CHECK_INTERVAL = "escalation.check.interval.seconds"; + + /** + * default value: {@value} + */ + int DEFAULT_ESCALATION_CHECK_INTERVAL = 30; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/OptionKeys.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/OptionKeys.java new file mode 100644 index 00000000000..a035a997ebd --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/OptionKeys.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +/** + * Keys for entries in the options section + * of a cluster description. + */ +public interface OptionKeys extends InternalKeys { + + /** + * Time in milliseconds to wait after forking any in-AM + * process before attempting to start up the containers: {@value} + * + * A shorter value brings the cluster up faster, but means that if the + * in AM process fails (due to a bad configuration), then time + * is wasted starting containers on a cluster that isn't going to come + * up + */ + String APPLICATION_TYPE = "application.type"; + + String APPLICATION_NAME = "application.name"; + + /** + * Prefix for site.xml options: {@value} + */ + String SITE_XML_PREFIX = "site."; + + + /** + * Zookeeper quorum host list: {@value} + */ + String ZOOKEEPER_QUORUM = "zookeeper.quorum"; + String ZOOKEEPER_HOSTS = "zookeeper.hosts"; + String ZOOKEEPER_PORT = "zookeeper.port"; + + /** + * Zookeeper path value (string): {@value} + */ + String ZOOKEEPER_PATH = "zookeeper.path"; + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ResourceKeys.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ResourceKeys.java new file mode 100644 index 00000000000..92890be9b02 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/ResourceKeys.java @@ -0,0 +1,201 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +/** + * These are the keys valid in resource options + * + /* + + Container failure window. + + The window is calculated in minutes as as (days * 24 *60 + hours* 24 + minutes) + + Every interval of this period after the AM is started/restarted becomes + the time period in which the CONTAINER_FAILURE_THRESHOLD value is calculated. + + After the window limit is reached, the failure counts are reset. This + is not a sliding window/moving average policy, simply a rule such as + "every six hours the failure count is reset" + + +

+ ===========================================================================
+ 
+ + */ +public interface ResourceKeys { + + + /** + * #of instances of a component: {@value} + * + */ + String COMPONENT_INSTANCES = "yarn.component.instances"; + + /** + * Whether to use unique names for each instance of a component: {@value} + */ + String UNIQUE_NAMES = "component.unique.names"; + + /** + * Amount of memory to ask YARN for in MB. + * Important: this may be a hard limit on the + * amount of RAM that the service can use + * {@value} + */ + String YARN_MEMORY = "yarn.memory"; + + /** {@value} */ + int DEF_YARN_MEMORY = 256; + + /** + * Number of cores/virtual cores to ask YARN for + * {@value} + */ + String YARN_CORES = "yarn.vcores"; + + /** + * Number of disks per instance to ask YARN for + * {@value} + */ + String YARN_DISKS = "yarn.disks.count-per-instance"; + + /** + * Disk size per disk to ask YARN for + * {@value} + */ + String YARN_DISK_SIZE = "yarn.disk.size"; + + /** {@value} */ + int DEF_YARN_CORES = 1; + + + /** + * Label expression that this container must satisfy + * {@value} + */ + String YARN_LABEL_EXPRESSION = "yarn.label.expression"; + + /** default label expression: */ + String DEF_YARN_LABEL_EXPRESSION = null; + + + /** + * Constant to indicate that the requirements of a YARN resource limit + * (cores, memory, ...) should be set to the maximum allowed by + * the queue into which the YARN container requests are placed. + */ + String YARN_RESOURCE_MAX = "max"; + + /** + * Mandatory property for all roles + * 1. this must be defined. + * 2. this must be >= 1 + * 3. this must not match any other role priority in the cluster. + */ + String COMPONENT_PRIORITY = "yarn.role.priority"; + + /** + * placement policy + */ + String COMPONENT_PLACEMENT_POLICY = "yarn.component.placement.policy"; + + /** + * Maximum number of node failures that can be tolerated by a component on a specific node + */ + String NODE_FAILURE_THRESHOLD = + "yarn.node.failure.threshold"; + + /** + * maximum number of failed containers (in a single role) + * before the cluster is deemed to have failed {@value} + */ + String CONTAINER_FAILURE_THRESHOLD = + "yarn.container.failure.threshold"; + + /** + * prefix for the time of the container failure reset window. + * {@value} + */ + + String CONTAINER_FAILURE_WINDOW = + "yarn.container.failure.window"; + + + + int DEFAULT_CONTAINER_FAILURE_WINDOW_DAYS = 0; + int DEFAULT_CONTAINER_FAILURE_WINDOW_HOURS = 6; + int DEFAULT_CONTAINER_FAILURE_WINDOW_MINUTES = 0; + + + /** + * Default failure threshold: {@value} + */ + int DEFAULT_CONTAINER_FAILURE_THRESHOLD = 5; + + /** + * Default node failure threshold for a component instance: {@value} + * Should to be lower than default component failure threshold to allow + * the component to start elsewhere + */ + int DEFAULT_NODE_FAILURE_THRESHOLD = 3; + + /** + * Failure threshold is unlimited: {@value} + */ + int NODE_FAILURE_THRESHOLD_UNLIMITED = -1; + + /** + * Time in seconds to escalate placement delay + */ + String PLACEMENT_ESCALATE_DELAY = + "yarn.placement.escalate.seconds"; + + /** + * Time to have a strict placement policy outstanding before + * downgrading to a lax placement (for those components which permit that). + *
    + *
  1. For strictly placed components, there's no relaxation.
  2. + *
  3. For components with no locality, there's no need to relax
  4. + *
+ * + */ + int DEFAULT_PLACEMENT_ESCALATE_DELAY_SECONDS = 30; + + /** + * Log aggregation include, exclude patterns + */ + String YARN_LOG_INCLUDE_PATTERNS = "yarn.log.include.patterns"; + String YARN_LOG_EXCLUDE_PATTERNS = "yarn.log.exclude.patterns"; + + String YARN_PROFILE_NAME = "yarn.resource-profile-name"; + + /** + * Window of time where application master's failure count + * can be reset to 0. + */ + String YARN_RESOURCEMANAGER_AM_RETRY_COUNT_WINDOW_MS = + "yarn.resourcemanager.am.retry-count-window-ms"; + + /** + * The default window for Slider. + */ + long DEFAULT_AM_RETRY_COUNT_WINDOW_MS = 300000; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/RoleKeys.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/RoleKeys.java new file mode 100644 index 00000000000..812a6b3ff23 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/RoleKeys.java @@ -0,0 +1,116 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +/** + * Standard options for roles + */ +public interface RoleKeys { + + + /** + * The name of a role: {@value} + */ + String ROLE_NAME = "role.name"; + + /** + * The group of a role: {@value} + */ + String ROLE_GROUP = "role.group"; + + /** + * Status report: number actually granted : {@value} + */ + String ROLE_ACTUAL_INSTANCES = "role.actual.instances"; + + /** + * Status report: number currently requested: {@value} + */ + String ROLE_REQUESTED_INSTANCES = "role.requested.instances"; + + /** + * Status report: number currently being released: {@value} + */ + String ROLE_RELEASING_INSTANCES = "role.releasing.instances"; + + /** + * Status report: total number that have failed: {@value} + */ + String ROLE_FAILED_INSTANCES = "role.failed.instances"; + + /** + * Status report: number that have failed recently: {@value} + */ + String ROLE_FAILED_RECENTLY_INSTANCES = "role.failed.recently.instances"; + + /** + * Status report: number that have failed for node-related issues: {@value} + */ + String ROLE_NODE_FAILED_INSTANCES = "role.failed.node.instances"; + + /** + * Status report: number that been pre-empted: {@value} + */ + String ROLE_PREEMPTED_INSTANCES = "role.failed.preempted.instances"; + + /** + * Number of pending anti-affine instances: {@value} + */ + String ROLE_PENDING_AA_INSTANCES = "role.pending.aa.instances"; + + /** + * Status report: number currently being released: {@value} + */ + String ROLE_FAILED_STARTING_INSTANCES = "role.failed.starting.instances"; + + /** + * Extra arguments (non-JVM) to use when starting this role + */ + String ROLE_ADDITIONAL_ARGS = "role.additional.args"; + + /** + * JVM heap size for Java applications in MB. Only relevant for Java applications. + * This MUST be less than or equal to the {@link ResourceKeys#YARN_MEMORY} option + * {@value} + */ + String JVM_HEAP = "jvm.heapsize"; + + /* + * GC options for Java applications. + */ + String GC_OPTS = "gc.opts"; + + /** + * JVM options other than heap size. Only relevant for Java applications. + * {@value} + */ + String JVM_OPTS = "jvm.opts"; + + + /** + * All keys w/ env. are converted into env variables and passed down + */ + String ENV_PREFIX = "env."; + + /** + * Container service record attribute prefix. + */ + String SERVICE_RECORD_ATTRIBUTE_PREFIX = "service.record.attribute"; + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/SliderApplicationApi.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/SliderApplicationApi.java new file mode 100644 index 00000000000..d21785f5663 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/SliderApplicationApi.java @@ -0,0 +1,167 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +import org.apache.slider.api.types.ApplicationLivenessInformation; +import org.apache.slider.api.types.ComponentInformation; +import org.apache.slider.api.types.ContainerInformation; +import org.apache.slider.api.types.NodeInformation; +import org.apache.slider.api.types.NodeInformationList; +import org.apache.slider.api.types.PingInformation; +import org.apache.slider.core.conf.AggregateConf; +import org.apache.slider.core.conf.ConfTree; +import org.apache.slider.core.conf.ConfTreeOperations; + +import java.io.IOException; +import java.util.Map; + +/** + * API exported by the slider remote REST/IPC endpoints. + */ +public interface SliderApplicationApi { + /** + * Get the aggregate desired model + * @return the aggregate configuration of what was asked for + * -before resolution has taken place + * @throws IOException on any failure + */ + AggregateConf getDesiredModel() throws IOException; + + /** + * Get the desired application configuration + * @return the application configuration asked for + * -before resolution has taken place + * @throws IOException on any failure + */ + ConfTreeOperations getDesiredAppconf() throws IOException; + + /** + * Get the desired YARN resources + * @return the resources asked for + * -before resolution has taken place + * @throws IOException on any failure + */ + ConfTreeOperations getDesiredResources() throws IOException; + + /** + * Put an updated resources structure. This triggers a cluster flex + * operation + * @param updated updated resources + * @throws IOException on any problem. + */ + void putDesiredResources(ConfTree updated) throws IOException; + + /** + * Get the aggregate resolved model + * @return the aggregate configuration of what was asked for + * -after resolution has taken place + * @throws IOException on any failure + */ + AggregateConf getResolvedModel() throws IOException; + + /** + * Get the resolved application configuration + * @return the application configuration asked for + * -after resolution has taken place + * @throws IOException on any failure + */ + ConfTreeOperations getResolvedAppconf() throws IOException; + + /** + * Get the resolved YARN resources + * @return the resources asked for + * -after resolution has taken place + * @throws IOException on any failure + */ + ConfTreeOperations getResolvedResources() throws IOException; + + /** + * Get the live YARN resources + * @return the live set of resources in the cluster + * @throws IOException on any failure + */ + ConfTreeOperations getLiveResources() throws IOException; + + /** + * Get a map of live containers [containerId:info] + * @return a possibly empty list of serialized containers + * @throws IOException on any failure + */ + Map enumContainers() throws IOException; + + /** + * Get a container from the container Id + * @param containerId YARN container ID + * @return the container information + * @throws IOException on any failure + */ + ContainerInformation getContainer(String containerId) throws IOException; + + /** + * List all components into a map of [name:info] + * @return a possibly empty map of components + * @throws IOException on any failure + */ + Map enumComponents() throws IOException; + + /** + * Get information about a component + * @param componentName name of the component + * @return the component details + * @throws IOException on any failure + */ + ComponentInformation getComponent(String componentName) throws IOException; + + /** + * List all nodes into a map of [name:info] + * @return a possibly empty list of nodes + * @throws IOException on any failure + */ + NodeInformationList getLiveNodes() throws IOException; + + /** + * Get information about a node + * @param hostname name of the node + * @return the node details + * @throws IOException on any failure + */ + NodeInformation getLiveNode(String hostname) throws IOException; + + /** + * Ping as a GET + * @param text text to include + * @return the response + * @throws IOException on any failure + */ + PingInformation ping(String text) throws IOException; + + /** + * Stop the AM (async operation) + * @param text text to include + * @throws IOException on any failure + */ + void stop(String text) throws IOException; + + /** + * Get the application liveness + * @return current liveness information + * @throws IOException + */ + ApplicationLivenessInformation getApplicationLiveness() throws IOException; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/SliderClusterProtocol.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/SliderClusterProtocol.java new file mode 100644 index 00000000000..33fce22f6aa --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/SliderClusterProtocol.java @@ -0,0 +1,179 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") throws IOException, YarnException; 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +import org.apache.hadoop.ipc.VersionedProtocol; +import org.apache.hadoop.security.KerberosInfo; +import org.apache.hadoop.yarn.exceptions.YarnException; +import org.apache.slider.api.proto.Messages; +import org.apache.slider.common.SliderXmlConfKeys; + +import java.io.IOException; + +/** + * Cluster protocol. This can currently act as a versioned IPC + * endpoint or be relayed via protobuf + */ +@KerberosInfo(serverPrincipal = SliderXmlConfKeys.KEY_KERBEROS_PRINCIPAL) +public interface SliderClusterProtocol extends VersionedProtocol { + long versionID = 0x01; + + /** + * Stop the cluster + */ + + Messages.StopClusterResponseProto stopCluster(Messages.StopClusterRequestProto request) throws + IOException, YarnException; + /** + * Upgrade the application containers + * + * @param request upgrade containers request object + * @return upgrade containers response object + * @throws IOException + * @throws YarnException + */ + Messages.UpgradeContainersResponseProto upgradeContainers( + Messages.UpgradeContainersRequestProto request) throws IOException, + YarnException; + + /** + * Flex the cluster. + */ + Messages.FlexClusterResponseProto flexCluster(Messages.FlexClusterRequestProto request) + throws IOException; + + + /** + * Get the current cluster status + */ + Messages.GetJSONClusterStatusResponseProto getJSONClusterStatus(Messages.GetJSONClusterStatusRequestProto request) + throws IOException, YarnException; + + + /** + * List all running nodes in a role + */ + Messages.ListNodeUUIDsByRoleResponseProto listNodeUUIDsByRole(Messages.ListNodeUUIDsByRoleRequestProto request) + throws IOException, YarnException; + + + /** + * Get the details on a node + */ + Messages.GetNodeResponseProto getNode(Messages.GetNodeRequestProto request) + throws IOException, YarnException; + + /** + * Get the + * details on a list of nodes. + * Unknown nodes are not returned + * Important: the order of the results are undefined + */ + Messages.GetClusterNodesResponseProto getClusterNodes(Messages.GetClusterNodesRequestProto request) + throws IOException, YarnException; + + /** + * Echo back the submitted text (after logging it). + * Useful for adding information to the log, and for testing round trip + * operations of the protocol + * @param request request + * @return response + * @throws IOException + * @throws YarnException + */ + Messages.EchoResponseProto echo(Messages.EchoRequestProto request) throws IOException, YarnException; + + /** + * Kill an identified container + * @param request request containing the container to kill + * @return the response + * @throws IOException + * @throws YarnException + */ + Messages.KillContainerResponseProto killContainer(Messages.KillContainerRequestProto request) + throws IOException, YarnException; + + /** + * AM to commit suicide. If the Hadoop halt entry point has not been disabled, + * this will fail rather than return with a response. + * @param request request + * @return response (this is not the expected outcome) + * @throws IOException + * @throws YarnException + */ + Messages.AMSuicideResponseProto amSuicide(Messages.AMSuicideRequestProto request) + throws IOException; + + /** + * Get the instance definition + */ + Messages.GetInstanceDefinitionResponseProto getInstanceDefinition( + Messages.GetInstanceDefinitionRequestProto request) + throws IOException, YarnException; + + /** + * Get the application liveness + * @return current liveness information + * @throws IOException + */ + Messages.ApplicationLivenessInformationProto getLivenessInformation( + Messages.GetApplicationLivenessRequestProto request + ) throws IOException; + + Messages.GetLiveContainersResponseProto getLiveContainers( + Messages.GetLiveContainersRequestProto request + ) throws IOException; + + Messages.ContainerInformationProto getLiveContainer( + Messages.GetLiveContainerRequestProto request + ) throws IOException; + + Messages.GetLiveComponentsResponseProto getLiveComponents( + Messages.GetLiveComponentsRequestProto request + ) throws IOException; + + Messages.ComponentInformationProto getLiveComponent( + Messages.GetLiveComponentRequestProto request + ) throws IOException; + + Messages.GetLiveNodesResponseProto getLiveNodes( + Messages.GetLiveNodesRequestProto request + ) throws IOException; + + Messages.NodeInformationProto getLiveNode( + Messages.GetLiveNodeRequestProto request + ) throws IOException; + + Messages.WrappedJsonProto getModelDesired(Messages.EmptyPayloadProto request) throws IOException; + + Messages.WrappedJsonProto getModelDesiredAppconf(Messages.EmptyPayloadProto request) throws IOException; + + Messages.WrappedJsonProto getModelDesiredResources(Messages.EmptyPayloadProto request) throws IOException; + + Messages.WrappedJsonProto getModelResolved(Messages.EmptyPayloadProto request) throws IOException; + + Messages.WrappedJsonProto getModelResolvedAppconf(Messages.EmptyPayloadProto request) throws IOException; + + Messages.WrappedJsonProto getModelResolvedResources(Messages.EmptyPayloadProto request) throws IOException; + + Messages.WrappedJsonProto getLiveResources(Messages.EmptyPayloadProto request) throws IOException; + + Messages.GetCertificateStoreResponseProto getClientCertificateStore(Messages.GetCertificateStoreRequestProto request) + throws IOException; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/StateValues.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/StateValues.java new file mode 100644 index 00000000000..03751e15f1d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/StateValues.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; + +/** + * Enumeration of state values + */ +public class StateValues { + + /** + * Specification is incomplete & cannot + * be used: {@value} + */ + public static final int STATE_INCOMPLETE = 0; + + /** + * Spec has been submitted: {@value} + */ + public static final int STATE_SUBMITTED = 1; + /** + * Cluster created: {@value} + */ + public static final int STATE_CREATED = 2; + /** + * Live: {@value} + */ + public static final int STATE_LIVE = 3; + /** + * Stopped + */ + public static final int STATE_STOPPED = 4; + /** + * destroyed + */ + public static final int STATE_DESTROYED = 5; + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/StatusKeys.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/StatusKeys.java new file mode 100644 index 00000000000..8a2c4bb4c9b --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/StatusKeys.java @@ -0,0 +1,117 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api; +import static org.apache.slider.api.ResourceKeys.COMPONENT_INSTANCES; +/** + * Contains status and statistics keys + */ +public interface StatusKeys { + + String STATISTICS_CONTAINERS_ACTIVE_REQUESTS = "containers.active.requests"; + String STATISTICS_CONTAINERS_COMPLETED = "containers.completed"; + String STATISTICS_CONTAINERS_DESIRED = "containers.desired"; + String STATISTICS_CONTAINERS_FAILED = "containers.failed"; + String STATISTICS_CONTAINERS_FAILED_RECENTLY = "containers.failed.recently"; + String STATISTICS_CONTAINERS_FAILED_NODE = "containers.failed.node"; + String STATISTICS_CONTAINERS_PREEMPTED = "containers.failed.preempted"; + String STATISTICS_CONTAINERS_LIVE = "containers.live"; + String STATISTICS_CONTAINERS_REQUESTED = "containers.requested"; + String STATISTICS_CONTAINERS_ANTI_AFFINE_PENDING = "containers.anti-affine.pending"; + String STATISTICS_CONTAINERS_STARTED = "containers.start.started"; + String STATISTICS_CONTAINERS_START_FAILED = + "containers.start.failed"; + String STATISTICS_CONTAINERS_SURPLUS = + "containers.surplus"; + String STATISTICS_CONTAINERS_UNKNOWN_COMPLETED = + "containers.unknown.completed"; + /** + * No of containers provided on AM restart + */ + String INFO_CONTAINERS_AM_RESTART = "containers.at.am-restart"; + + String INFO_CREATE_TIME_MILLIS = "create.time.millis"; + String INFO_CREATE_TIME_HUMAN = "create.time"; + String INFO_LIVE_TIME_MILLIS = "live.time.millis"; + String INFO_LIVE_TIME_HUMAN = "live.time"; + String INFO_FLEX_TIME_MILLIS = "flex.time.millis"; + String INFO_FLEX_TIME_HUMAN = "flex.time"; + + String INFO_MASTER_ADDRESS = "info.master.address"; + + /** + * System time in millis when the status report was generated + */ + String INFO_STATUS_TIME_MILLIS = "status.time.millis"; + + /** + * System time in human form when the status report was generated + */ + String INFO_STATUS_TIME_HUMAN = "status.time"; + + String INFO_AM_APP_ID = "info.am.app.id"; + String INFO_AM_ATTEMPT_ID = "info.am.attempt.id"; + String INFO_AM_CONTAINER_ID = "info.am.container.id"; + String INFO_AM_HOSTNAME = "info.am.hostname"; + String INFO_AM_RPC_PORT = "info.am.rpc.port"; + String INFO_AM_WEB_PORT = "info.am.web.port"; + String INFO_AM_WEB_URL = "info.am.web.url"; + String INFO_AM_AGENT_STATUS_PORT = "info.am.agent.status.port"; + String INFO_AM_AGENT_OPS_PORT = "info.am.agent.ops.port"; + String INFO_AM_AGENT_OPS_URL = "info.am.agent.ops.url"; + String INFO_AM_AGENT_STATUS_URL = "info.am.agent.status.url"; + + /** + * info: #of instances of a component requested: {@value} + * + */ + String COMPONENT_INSTANCES_ACTUAL = COMPONENT_INSTANCES + ".actual"; + + /** + * info: #of instances of a component requested: {@value} + * + */ + String COMPONENT_INSTANCES_REQUESTING = COMPONENT_INSTANCES + ".requesting"; + + /** + * info: #of instances of a component being released: {@value} + * + */ + String COMPONENT_INSTANCES_RELEASING = COMPONENT_INSTANCES + ".releasing"; + + /** + * info: #of instances of a component failed: {@value} + * + */ + String COMPONENT_INSTANCES_FAILED = COMPONENT_INSTANCES + ".failed"; + + /** + * info: #of instances of a component started: {@value} + * + */ + String COMPONENT_INSTANCES_STARTED = COMPONENT_INSTANCES + ".started"; + + + /** + * info: #of instances of a component completed: {@value} + * + */ + String COMPONENT_INSTANCES_COMPLETED = COMPONENT_INSTANCES + ".completed"; + + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/Messages.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/Messages.java new file mode 100644 index 00000000000..373d64d35b3 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/Messages.java @@ -0,0 +1,34473 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SliderClusterMessages.proto + +package org.apache.slider.api.proto; + +public final class Messages { + private Messages() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface RoleInstanceStateOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string name = 1; + /** + * required string name = 1; + */ + boolean hasName(); + /** + * required string name = 1; + */ + java.lang.String getName(); + /** + * required string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional string role = 2; + /** + * optional string role = 2; + */ + boolean hasRole(); + /** + * optional string role = 2; + */ + java.lang.String getRole(); + /** + * optional string role = 2; + */ + com.google.protobuf.ByteString + getRoleBytes(); + + // required uint32 state = 4; + /** + * required uint32 state = 4; + */ + boolean hasState(); + /** + * required uint32 state = 4; + */ + int getState(); + + // required uint32 exitCode = 5; + /** + * required uint32 exitCode = 5; + */ + boolean hasExitCode(); + /** + * required uint32 exitCode = 5; + */ + int getExitCode(); + + // optional string command = 6; + /** + * optional string command = 6; + */ + boolean hasCommand(); + /** + * optional string command = 6; + */ + java.lang.String getCommand(); + /** + * optional string command = 6; + */ + com.google.protobuf.ByteString + getCommandBytes(); + + // optional string diagnostics = 7; + /** + * optional string diagnostics = 7; + */ + boolean hasDiagnostics(); + /** + * optional string diagnostics = 7; + */ + java.lang.String getDiagnostics(); + /** + * optional string diagnostics = 7; + */ + com.google.protobuf.ByteString + getDiagnosticsBytes(); + + // repeated string output = 8; + /** + * repeated string output = 8; + */ + java.util.List + getOutputList(); + /** + * repeated string output = 8; + */ + int getOutputCount(); + /** + * repeated string output = 8; + */ + java.lang.String getOutput(int index); + /** + * repeated string output = 8; + */ + com.google.protobuf.ByteString + getOutputBytes(int index); + + // repeated string environment = 9; + /** + * repeated string environment = 9; + */ + java.util.List + getEnvironmentList(); + /** + * repeated string environment = 9; + */ + int getEnvironmentCount(); + /** + * repeated string environment = 9; + */ + java.lang.String getEnvironment(int index); + /** + * repeated string environment = 9; + */ + com.google.protobuf.ByteString + getEnvironmentBytes(int index); + + // required uint32 roleId = 10; + /** + * required uint32 roleId = 10; + */ + boolean hasRoleId(); + /** + * required uint32 roleId = 10; + */ + int getRoleId(); + + // required bool released = 11; + /** + * required bool released = 11; + */ + boolean hasReleased(); + /** + * required bool released = 11; + */ + boolean getReleased(); + + // required int64 createTime = 12; + /** + * required int64 createTime = 12; + */ + boolean hasCreateTime(); + /** + * required int64 createTime = 12; + */ + long getCreateTime(); + + // required int64 startTime = 13; + /** + * required int64 startTime = 13; + */ + boolean hasStartTime(); + /** + * required int64 startTime = 13; + */ + long getStartTime(); + + // required string host = 14; + /** + * required string host = 14; + */ + boolean hasHost(); + /** + * required string host = 14; + */ + java.lang.String getHost(); + /** + * required string host = 14; + */ + com.google.protobuf.ByteString + getHostBytes(); + + // required string hostURL = 15; + /** + * required string hostURL = 15; + */ + boolean hasHostURL(); + /** + * required string hostURL = 15; + */ + java.lang.String getHostURL(); + /** + * required string hostURL = 15; + */ + com.google.protobuf.ByteString + getHostURLBytes(); + + // optional string appVersion = 16; + /** + * optional string appVersion = 16; + */ + boolean hasAppVersion(); + /** + * optional string appVersion = 16; + */ + java.lang.String getAppVersion(); + /** + * optional string appVersion = 16; + */ + com.google.protobuf.ByteString + getAppVersionBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.RoleInstanceState} + */ + public static final class RoleInstanceState extends + com.google.protobuf.GeneratedMessage + implements RoleInstanceStateOrBuilder { + // Use RoleInstanceState.newBuilder() to construct. + private RoleInstanceState(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private RoleInstanceState(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final RoleInstanceState defaultInstance; + public static RoleInstanceState getDefaultInstance() { + return defaultInstance; + } + + public RoleInstanceState getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RoleInstanceState( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + role_ = input.readBytes(); + break; + } + case 32: { + bitField0_ |= 0x00000004; + state_ = input.readUInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000008; + exitCode_ = input.readUInt32(); + break; + } + case 50: { + bitField0_ |= 0x00000010; + command_ = input.readBytes(); + break; + } + case 58: { + bitField0_ |= 0x00000020; + diagnostics_ = input.readBytes(); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + output_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000040; + } + output_.add(input.readBytes()); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + environment_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000080; + } + environment_.add(input.readBytes()); + break; + } + case 80: { + bitField0_ |= 0x00000040; + roleId_ = input.readUInt32(); + break; + } + case 88: { + bitField0_ |= 0x00000080; + released_ = input.readBool(); + break; + } + case 96: { + bitField0_ |= 0x00000100; + createTime_ = input.readInt64(); + break; + } + case 104: { + bitField0_ |= 0x00000200; + startTime_ = input.readInt64(); + break; + } + case 114: { + bitField0_ |= 0x00000400; + host_ = input.readBytes(); + break; + } + case 122: { + bitField0_ |= 0x00000800; + hostURL_ = input.readBytes(); + break; + } + case 130: { + bitField0_ |= 0x00001000; + appVersion_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + output_ = new com.google.protobuf.UnmodifiableLazyStringList(output_); + } + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + environment_ = new com.google.protobuf.UnmodifiableLazyStringList(environment_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_RoleInstanceState_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_RoleInstanceState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.RoleInstanceState.class, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RoleInstanceState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RoleInstanceState(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * required string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * required string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string role = 2; + public static final int ROLE_FIELD_NUMBER = 2; + private java.lang.Object role_; + /** + * optional string role = 2; + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string role = 2; + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + role_ = s; + } + return s; + } + } + /** + * optional string role = 2; + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required uint32 state = 4; + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * required uint32 state = 4; + */ + public boolean hasState() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required uint32 state = 4; + */ + public int getState() { + return state_; + } + + // required uint32 exitCode = 5; + public static final int EXITCODE_FIELD_NUMBER = 5; + private int exitCode_; + /** + * required uint32 exitCode = 5; + */ + public boolean hasExitCode() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required uint32 exitCode = 5; + */ + public int getExitCode() { + return exitCode_; + } + + // optional string command = 6; + public static final int COMMAND_FIELD_NUMBER = 6; + private java.lang.Object command_; + /** + * optional string command = 6; + */ + public boolean hasCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string command = 6; + */ + public java.lang.String getCommand() { + java.lang.Object ref = command_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + command_ = s; + } + return s; + } + } + /** + * optional string command = 6; + */ + public com.google.protobuf.ByteString + getCommandBytes() { + java.lang.Object ref = command_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + command_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string diagnostics = 7; + public static final int DIAGNOSTICS_FIELD_NUMBER = 7; + private java.lang.Object diagnostics_; + /** + * optional string diagnostics = 7; + */ + public boolean hasDiagnostics() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string diagnostics = 7; + */ + public java.lang.String getDiagnostics() { + java.lang.Object ref = diagnostics_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + diagnostics_ = s; + } + return s; + } + } + /** + * optional string diagnostics = 7; + */ + public com.google.protobuf.ByteString + getDiagnosticsBytes() { + java.lang.Object ref = diagnostics_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + diagnostics_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated string output = 8; + public static final int OUTPUT_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList output_; + /** + * repeated string output = 8; + */ + public java.util.List + getOutputList() { + return output_; + } + /** + * repeated string output = 8; + */ + public int getOutputCount() { + return output_.size(); + } + /** + * repeated string output = 8; + */ + public java.lang.String getOutput(int index) { + return output_.get(index); + } + /** + * repeated string output = 8; + */ + public com.google.protobuf.ByteString + getOutputBytes(int index) { + return output_.getByteString(index); + } + + // repeated string environment = 9; + public static final int ENVIRONMENT_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList environment_; + /** + * repeated string environment = 9; + */ + public java.util.List + getEnvironmentList() { + return environment_; + } + /** + * repeated string environment = 9; + */ + public int getEnvironmentCount() { + return environment_.size(); + } + /** + * repeated string environment = 9; + */ + public java.lang.String getEnvironment(int index) { + return environment_.get(index); + } + /** + * repeated string environment = 9; + */ + public com.google.protobuf.ByteString + getEnvironmentBytes(int index) { + return environment_.getByteString(index); + } + + // required uint32 roleId = 10; + public static final int ROLEID_FIELD_NUMBER = 10; + private int roleId_; + /** + * required uint32 roleId = 10; + */ + public boolean hasRoleId() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * required uint32 roleId = 10; + */ + public int getRoleId() { + return roleId_; + } + + // required bool released = 11; + public static final int RELEASED_FIELD_NUMBER = 11; + private boolean released_; + /** + * required bool released = 11; + */ + public boolean hasReleased() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * required bool released = 11; + */ + public boolean getReleased() { + return released_; + } + + // required int64 createTime = 12; + public static final int CREATETIME_FIELD_NUMBER = 12; + private long createTime_; + /** + * required int64 createTime = 12; + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * required int64 createTime = 12; + */ + public long getCreateTime() { + return createTime_; + } + + // required int64 startTime = 13; + public static final int STARTTIME_FIELD_NUMBER = 13; + private long startTime_; + /** + * required int64 startTime = 13; + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * required int64 startTime = 13; + */ + public long getStartTime() { + return startTime_; + } + + // required string host = 14; + public static final int HOST_FIELD_NUMBER = 14; + private java.lang.Object host_; + /** + * required string host = 14; + */ + public boolean hasHost() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * required string host = 14; + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + host_ = s; + } + return s; + } + } + /** + * required string host = 14; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string hostURL = 15; + public static final int HOSTURL_FIELD_NUMBER = 15; + private java.lang.Object hostURL_; + /** + * required string hostURL = 15; + */ + public boolean hasHostURL() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * required string hostURL = 15; + */ + public java.lang.String getHostURL() { + java.lang.Object ref = hostURL_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + hostURL_ = s; + } + return s; + } + } + /** + * required string hostURL = 15; + */ + public com.google.protobuf.ByteString + getHostURLBytes() { + java.lang.Object ref = hostURL_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostURL_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string appVersion = 16; + public static final int APPVERSION_FIELD_NUMBER = 16; + private java.lang.Object appVersion_; + /** + * optional string appVersion = 16; + */ + public boolean hasAppVersion() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional string appVersion = 16; + */ + public java.lang.String getAppVersion() { + java.lang.Object ref = appVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + appVersion_ = s; + } + return s; + } + } + /** + * optional string appVersion = 16; + */ + public com.google.protobuf.ByteString + getAppVersionBytes() { + java.lang.Object ref = appVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + name_ = ""; + role_ = ""; + state_ = 0; + exitCode_ = 0; + command_ = ""; + diagnostics_ = ""; + output_ = com.google.protobuf.LazyStringArrayList.EMPTY; + environment_ = com.google.protobuf.LazyStringArrayList.EMPTY; + roleId_ = 0; + released_ = false; + createTime_ = 0L; + startTime_ = 0L; + host_ = ""; + hostURL_ = ""; + appVersion_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasState()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasExitCode()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRoleId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasReleased()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCreateTime()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasStartTime()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasHost()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasHostURL()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getRoleBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeUInt32(4, state_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeUInt32(5, exitCode_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(6, getCommandBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(7, getDiagnosticsBytes()); + } + for (int i = 0; i < output_.size(); i++) { + output.writeBytes(8, output_.getByteString(i)); + } + for (int i = 0; i < environment_.size(); i++) { + output.writeBytes(9, environment_.getByteString(i)); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeUInt32(10, roleId_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBool(11, released_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeInt64(12, createTime_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeInt64(13, startTime_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBytes(14, getHostBytes()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBytes(15, getHostURLBytes()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + output.writeBytes(16, getAppVersionBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getRoleBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, state_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, exitCode_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, getCommandBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, getDiagnosticsBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < output_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(output_.getByteString(i)); + } + size += dataSize; + size += 1 * getOutputList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < environment_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(environment_.getByteString(i)); + } + size += dataSize; + size += 1 * getEnvironmentList().size(); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, roleId_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, released_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, createTime_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(13, startTime_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(14, getHostBytes()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(15, getHostURLBytes()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(16, getAppVersionBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.RoleInstanceState)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.RoleInstanceState other = (org.apache.slider.api.proto.Messages.RoleInstanceState) obj; + + boolean result = true; + result = result && (hasName() == other.hasName()); + if (hasName()) { + result = result && getName() + .equals(other.getName()); + } + result = result && (hasRole() == other.hasRole()); + if (hasRole()) { + result = result && getRole() + .equals(other.getRole()); + } + result = result && (hasState() == other.hasState()); + if (hasState()) { + result = result && (getState() + == other.getState()); + } + result = result && (hasExitCode() == other.hasExitCode()); + if (hasExitCode()) { + result = result && (getExitCode() + == other.getExitCode()); + } + result = result && (hasCommand() == other.hasCommand()); + if (hasCommand()) { + result = result && getCommand() + .equals(other.getCommand()); + } + result = result && (hasDiagnostics() == other.hasDiagnostics()); + if (hasDiagnostics()) { + result = result && getDiagnostics() + .equals(other.getDiagnostics()); + } + result = result && getOutputList() + .equals(other.getOutputList()); + result = result && getEnvironmentList() + .equals(other.getEnvironmentList()); + result = result && (hasRoleId() == other.hasRoleId()); + if (hasRoleId()) { + result = result && (getRoleId() + == other.getRoleId()); + } + result = result && (hasReleased() == other.hasReleased()); + if (hasReleased()) { + result = result && (getReleased() + == other.getReleased()); + } + result = result && (hasCreateTime() == other.hasCreateTime()); + if (hasCreateTime()) { + result = result && (getCreateTime() + == other.getCreateTime()); + } + result = result && (hasStartTime() == other.hasStartTime()); + if (hasStartTime()) { + result = result && (getStartTime() + == other.getStartTime()); + } + result = result && (hasHost() == other.hasHost()); + if (hasHost()) { + result = result && getHost() + .equals(other.getHost()); + } + result = result && (hasHostURL() == other.hasHostURL()); + if (hasHostURL()) { + result = result && getHostURL() + .equals(other.getHostURL()); + } + result = result && (hasAppVersion() == other.hasAppVersion()); + if (hasAppVersion()) { + result = result && getAppVersion() + .equals(other.getAppVersion()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + if (hasRole()) { + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState(); + } + if (hasExitCode()) { + hash = (37 * hash) + EXITCODE_FIELD_NUMBER; + hash = (53 * hash) + getExitCode(); + } + if (hasCommand()) { + hash = (37 * hash) + COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getCommand().hashCode(); + } + if (hasDiagnostics()) { + hash = (37 * hash) + DIAGNOSTICS_FIELD_NUMBER; + hash = (53 * hash) + getDiagnostics().hashCode(); + } + if (getOutputCount() > 0) { + hash = (37 * hash) + OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getOutputList().hashCode(); + } + if (getEnvironmentCount() > 0) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentList().hashCode(); + } + if (hasRoleId()) { + hash = (37 * hash) + ROLEID_FIELD_NUMBER; + hash = (53 * hash) + getRoleId(); + } + if (hasReleased()) { + hash = (37 * hash) + RELEASED_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getReleased()); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATETIME_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getCreateTime()); + } + if (hasStartTime()) { + hash = (37 * hash) + STARTTIME_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getStartTime()); + } + if (hasHost()) { + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + } + if (hasHostURL()) { + hash = (37 * hash) + HOSTURL_FIELD_NUMBER; + hash = (53 * hash) + getHostURL().hashCode(); + } + if (hasAppVersion()) { + hash = (37 * hash) + APPVERSION_FIELD_NUMBER; + hash = (53 * hash) + getAppVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.RoleInstanceState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.RoleInstanceState prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.RoleInstanceState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_RoleInstanceState_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_RoleInstanceState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.RoleInstanceState.class, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.RoleInstanceState.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + role_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + exitCode_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + command_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + diagnostics_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + output_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + environment_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + roleId_ = 0; + bitField0_ = (bitField0_ & ~0x00000100); + released_ = false; + bitField0_ = (bitField0_ & ~0x00000200); + createTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000400); + startTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000800); + host_ = ""; + bitField0_ = (bitField0_ & ~0x00001000); + hostURL_ = ""; + bitField0_ = (bitField0_ & ~0x00002000); + appVersion_ = ""; + bitField0_ = (bitField0_ & ~0x00004000); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_RoleInstanceState_descriptor; + } + + public org.apache.slider.api.proto.Messages.RoleInstanceState getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.RoleInstanceState build() { + org.apache.slider.api.proto.Messages.RoleInstanceState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.RoleInstanceState buildPartial() { + org.apache.slider.api.proto.Messages.RoleInstanceState result = new org.apache.slider.api.proto.Messages.RoleInstanceState(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.role_ = role_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.state_ = state_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.exitCode_ = exitCode_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.command_ = command_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.diagnostics_ = diagnostics_; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output_ = new com.google.protobuf.UnmodifiableLazyStringList( + output_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.output_ = output_; + if (((bitField0_ & 0x00000080) == 0x00000080)) { + environment_ = new com.google.protobuf.UnmodifiableLazyStringList( + environment_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.environment_ = environment_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000040; + } + result.roleId_ = roleId_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000080; + } + result.released_ = released_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000100; + } + result.createTime_ = createTime_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000200; + } + result.startTime_ = startTime_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00000400; + } + result.host_ = host_; + if (((from_bitField0_ & 0x00002000) == 0x00002000)) { + to_bitField0_ |= 0x00000800; + } + result.hostURL_ = hostURL_; + if (((from_bitField0_ & 0x00004000) == 0x00004000)) { + to_bitField0_ |= 0x00001000; + } + result.appVersion_ = appVersion_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.RoleInstanceState) { + return mergeFrom((org.apache.slider.api.proto.Messages.RoleInstanceState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.RoleInstanceState other) { + if (other == org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasRole()) { + bitField0_ |= 0x00000002; + role_ = other.role_; + onChanged(); + } + if (other.hasState()) { + setState(other.getState()); + } + if (other.hasExitCode()) { + setExitCode(other.getExitCode()); + } + if (other.hasCommand()) { + bitField0_ |= 0x00000010; + command_ = other.command_; + onChanged(); + } + if (other.hasDiagnostics()) { + bitField0_ |= 0x00000020; + diagnostics_ = other.diagnostics_; + onChanged(); + } + if (!other.output_.isEmpty()) { + if (output_.isEmpty()) { + output_ = other.output_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureOutputIsMutable(); + output_.addAll(other.output_); + } + onChanged(); + } + if (!other.environment_.isEmpty()) { + if (environment_.isEmpty()) { + environment_ = other.environment_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureEnvironmentIsMutable(); + environment_.addAll(other.environment_); + } + onChanged(); + } + if (other.hasRoleId()) { + setRoleId(other.getRoleId()); + } + if (other.hasReleased()) { + setReleased(other.getReleased()); + } + if (other.hasCreateTime()) { + setCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + setStartTime(other.getStartTime()); + } + if (other.hasHost()) { + bitField0_ |= 0x00001000; + host_ = other.host_; + onChanged(); + } + if (other.hasHostURL()) { + bitField0_ |= 0x00002000; + hostURL_ = other.hostURL_; + onChanged(); + } + if (other.hasAppVersion()) { + bitField0_ |= 0x00004000; + appVersion_ = other.appVersion_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasName()) { + + return false; + } + if (!hasState()) { + + return false; + } + if (!hasExitCode()) { + + return false; + } + if (!hasRoleId()) { + + return false; + } + if (!hasReleased()) { + + return false; + } + if (!hasCreateTime()) { + + return false; + } + if (!hasStartTime()) { + + return false; + } + if (!hasHost()) { + + return false; + } + if (!hasHostURL()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.RoleInstanceState parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.RoleInstanceState) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string name = 1; + private java.lang.Object name_ = ""; + /** + * required string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * required string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * required string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional string role = 2; + private java.lang.Object role_ = ""; + /** + * optional string role = 2; + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string role = 2; + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + role_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string role = 2; + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string role = 2; + */ + public Builder setRole( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + role_ = value; + onChanged(); + return this; + } + /** + * optional string role = 2; + */ + public Builder clearRole() { + bitField0_ = (bitField0_ & ~0x00000002); + role_ = getDefaultInstance().getRole(); + onChanged(); + return this; + } + /** + * optional string role = 2; + */ + public Builder setRoleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + role_ = value; + onChanged(); + return this; + } + + // required uint32 state = 4; + private int state_ ; + /** + * required uint32 state = 4; + */ + public boolean hasState() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required uint32 state = 4; + */ + public int getState() { + return state_; + } + /** + * required uint32 state = 4; + */ + public Builder setState(int value) { + bitField0_ |= 0x00000004; + state_ = value; + onChanged(); + return this; + } + /** + * required uint32 state = 4; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + // required uint32 exitCode = 5; + private int exitCode_ ; + /** + * required uint32 exitCode = 5; + */ + public boolean hasExitCode() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required uint32 exitCode = 5; + */ + public int getExitCode() { + return exitCode_; + } + /** + * required uint32 exitCode = 5; + */ + public Builder setExitCode(int value) { + bitField0_ |= 0x00000008; + exitCode_ = value; + onChanged(); + return this; + } + /** + * required uint32 exitCode = 5; + */ + public Builder clearExitCode() { + bitField0_ = (bitField0_ & ~0x00000008); + exitCode_ = 0; + onChanged(); + return this; + } + + // optional string command = 6; + private java.lang.Object command_ = ""; + /** + * optional string command = 6; + */ + public boolean hasCommand() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string command = 6; + */ + public java.lang.String getCommand() { + java.lang.Object ref = command_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + command_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string command = 6; + */ + public com.google.protobuf.ByteString + getCommandBytes() { + java.lang.Object ref = command_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + command_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string command = 6; + */ + public Builder setCommand( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + command_ = value; + onChanged(); + return this; + } + /** + * optional string command = 6; + */ + public Builder clearCommand() { + bitField0_ = (bitField0_ & ~0x00000010); + command_ = getDefaultInstance().getCommand(); + onChanged(); + return this; + } + /** + * optional string command = 6; + */ + public Builder setCommandBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + command_ = value; + onChanged(); + return this; + } + + // optional string diagnostics = 7; + private java.lang.Object diagnostics_ = ""; + /** + * optional string diagnostics = 7; + */ + public boolean hasDiagnostics() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string diagnostics = 7; + */ + public java.lang.String getDiagnostics() { + java.lang.Object ref = diagnostics_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + diagnostics_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string diagnostics = 7; + */ + public com.google.protobuf.ByteString + getDiagnosticsBytes() { + java.lang.Object ref = diagnostics_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + diagnostics_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string diagnostics = 7; + */ + public Builder setDiagnostics( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + diagnostics_ = value; + onChanged(); + return this; + } + /** + * optional string diagnostics = 7; + */ + public Builder clearDiagnostics() { + bitField0_ = (bitField0_ & ~0x00000020); + diagnostics_ = getDefaultInstance().getDiagnostics(); + onChanged(); + return this; + } + /** + * optional string diagnostics = 7; + */ + public Builder setDiagnosticsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + diagnostics_ = value; + onChanged(); + return this; + } + + // repeated string output = 8; + private com.google.protobuf.LazyStringList output_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureOutputIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + output_ = new com.google.protobuf.LazyStringArrayList(output_); + bitField0_ |= 0x00000040; + } + } + /** + * repeated string output = 8; + */ + public java.util.List + getOutputList() { + return java.util.Collections.unmodifiableList(output_); + } + /** + * repeated string output = 8; + */ + public int getOutputCount() { + return output_.size(); + } + /** + * repeated string output = 8; + */ + public java.lang.String getOutput(int index) { + return output_.get(index); + } + /** + * repeated string output = 8; + */ + public com.google.protobuf.ByteString + getOutputBytes(int index) { + return output_.getByteString(index); + } + /** + * repeated string output = 8; + */ + public Builder setOutput( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string output = 8; + */ + public Builder addOutput( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(value); + onChanged(); + return this; + } + /** + * repeated string output = 8; + */ + public Builder addAllOutput( + java.lang.Iterable values) { + ensureOutputIsMutable(); + super.addAll(values, output_); + onChanged(); + return this; + } + /** + * repeated string output = 8; + */ + public Builder clearOutput() { + output_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * repeated string output = 8; + */ + public Builder addOutputBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(value); + onChanged(); + return this; + } + + // repeated string environment = 9; + private com.google.protobuf.LazyStringList environment_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureEnvironmentIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + environment_ = new com.google.protobuf.LazyStringArrayList(environment_); + bitField0_ |= 0x00000080; + } + } + /** + * repeated string environment = 9; + */ + public java.util.List + getEnvironmentList() { + return java.util.Collections.unmodifiableList(environment_); + } + /** + * repeated string environment = 9; + */ + public int getEnvironmentCount() { + return environment_.size(); + } + /** + * repeated string environment = 9; + */ + public java.lang.String getEnvironment(int index) { + return environment_.get(index); + } + /** + * repeated string environment = 9; + */ + public com.google.protobuf.ByteString + getEnvironmentBytes(int index) { + return environment_.getByteString(index); + } + /** + * repeated string environment = 9; + */ + public Builder setEnvironment( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string environment = 9; + */ + public Builder addEnvironment( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.add(value); + onChanged(); + return this; + } + /** + * repeated string environment = 9; + */ + public Builder addAllEnvironment( + java.lang.Iterable values) { + ensureEnvironmentIsMutable(); + super.addAll(values, environment_); + onChanged(); + return this; + } + /** + * repeated string environment = 9; + */ + public Builder clearEnvironment() { + environment_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * repeated string environment = 9; + */ + public Builder addEnvironmentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentIsMutable(); + environment_.add(value); + onChanged(); + return this; + } + + // required uint32 roleId = 10; + private int roleId_ ; + /** + * required uint32 roleId = 10; + */ + public boolean hasRoleId() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * required uint32 roleId = 10; + */ + public int getRoleId() { + return roleId_; + } + /** + * required uint32 roleId = 10; + */ + public Builder setRoleId(int value) { + bitField0_ |= 0x00000100; + roleId_ = value; + onChanged(); + return this; + } + /** + * required uint32 roleId = 10; + */ + public Builder clearRoleId() { + bitField0_ = (bitField0_ & ~0x00000100); + roleId_ = 0; + onChanged(); + return this; + } + + // required bool released = 11; + private boolean released_ ; + /** + * required bool released = 11; + */ + public boolean hasReleased() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * required bool released = 11; + */ + public boolean getReleased() { + return released_; + } + /** + * required bool released = 11; + */ + public Builder setReleased(boolean value) { + bitField0_ |= 0x00000200; + released_ = value; + onChanged(); + return this; + } + /** + * required bool released = 11; + */ + public Builder clearReleased() { + bitField0_ = (bitField0_ & ~0x00000200); + released_ = false; + onChanged(); + return this; + } + + // required int64 createTime = 12; + private long createTime_ ; + /** + * required int64 createTime = 12; + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * required int64 createTime = 12; + */ + public long getCreateTime() { + return createTime_; + } + /** + * required int64 createTime = 12; + */ + public Builder setCreateTime(long value) { + bitField0_ |= 0x00000400; + createTime_ = value; + onChanged(); + return this; + } + /** + * required int64 createTime = 12; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + createTime_ = 0L; + onChanged(); + return this; + } + + // required int64 startTime = 13; + private long startTime_ ; + /** + * required int64 startTime = 13; + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * required int64 startTime = 13; + */ + public long getStartTime() { + return startTime_; + } + /** + * required int64 startTime = 13; + */ + public Builder setStartTime(long value) { + bitField0_ |= 0x00000800; + startTime_ = value; + onChanged(); + return this; + } + /** + * required int64 startTime = 13; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000800); + startTime_ = 0L; + onChanged(); + return this; + } + + // required string host = 14; + private java.lang.Object host_ = ""; + /** + * required string host = 14; + */ + public boolean hasHost() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * required string host = 14; + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string host = 14; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string host = 14; + */ + public Builder setHost( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + host_ = value; + onChanged(); + return this; + } + /** + * required string host = 14; + */ + public Builder clearHost() { + bitField0_ = (bitField0_ & ~0x00001000); + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + * required string host = 14; + */ + public Builder setHostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + host_ = value; + onChanged(); + return this; + } + + // required string hostURL = 15; + private java.lang.Object hostURL_ = ""; + /** + * required string hostURL = 15; + */ + public boolean hasHostURL() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * required string hostURL = 15; + */ + public java.lang.String getHostURL() { + java.lang.Object ref = hostURL_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + hostURL_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string hostURL = 15; + */ + public com.google.protobuf.ByteString + getHostURLBytes() { + java.lang.Object ref = hostURL_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostURL_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string hostURL = 15; + */ + public Builder setHostURL( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + hostURL_ = value; + onChanged(); + return this; + } + /** + * required string hostURL = 15; + */ + public Builder clearHostURL() { + bitField0_ = (bitField0_ & ~0x00002000); + hostURL_ = getDefaultInstance().getHostURL(); + onChanged(); + return this; + } + /** + * required string hostURL = 15; + */ + public Builder setHostURLBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + hostURL_ = value; + onChanged(); + return this; + } + + // optional string appVersion = 16; + private java.lang.Object appVersion_ = ""; + /** + * optional string appVersion = 16; + */ + public boolean hasAppVersion() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional string appVersion = 16; + */ + public java.lang.String getAppVersion() { + java.lang.Object ref = appVersion_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + appVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string appVersion = 16; + */ + public com.google.protobuf.ByteString + getAppVersionBytes() { + java.lang.Object ref = appVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string appVersion = 16; + */ + public Builder setAppVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + appVersion_ = value; + onChanged(); + return this; + } + /** + * optional string appVersion = 16; + */ + public Builder clearAppVersion() { + bitField0_ = (bitField0_ & ~0x00004000); + appVersion_ = getDefaultInstance().getAppVersion(); + onChanged(); + return this; + } + /** + * optional string appVersion = 16; + */ + public Builder setAppVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + appVersion_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.RoleInstanceState) + } + + static { + defaultInstance = new RoleInstanceState(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.RoleInstanceState) + } + + public interface StopClusterRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string message = 1; + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + boolean hasMessage(); + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + java.lang.String getMessage(); + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + com.google.protobuf.ByteString + getMessageBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.StopClusterRequestProto} + * + *
+   **
+   * stop the cluster
+   * 
+ */ + public static final class StopClusterRequestProto extends + com.google.protobuf.GeneratedMessage + implements StopClusterRequestProtoOrBuilder { + // Use StopClusterRequestProto.newBuilder() to construct. + private StopClusterRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private StopClusterRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final StopClusterRequestProto defaultInstance; + public static StopClusterRequestProto getDefaultInstance() { + return defaultInstance; + } + + public StopClusterRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StopClusterRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + message_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.StopClusterRequestProto.class, org.apache.slider.api.proto.Messages.StopClusterRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public StopClusterRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StopClusterRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string message = 1; + public static final int MESSAGE_FIELD_NUMBER = 1; + private java.lang.Object message_; + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + public boolean hasMessage() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + message_ = s; + } + return s; + } + } + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + message_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasMessage()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getMessageBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getMessageBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.StopClusterRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.StopClusterRequestProto other = (org.apache.slider.api.proto.Messages.StopClusterRequestProto) obj; + + boolean result = true; + result = result && (hasMessage() == other.hasMessage()); + if (hasMessage()) { + result = result && getMessage() + .equals(other.getMessage()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasMessage()) { + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.StopClusterRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.StopClusterRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.StopClusterRequestProto} + * + *
+     **
+     * stop the cluster
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.StopClusterRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.StopClusterRequestProto.class, org.apache.slider.api.proto.Messages.StopClusterRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.StopClusterRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + message_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.StopClusterRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.StopClusterRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.StopClusterRequestProto build() { + org.apache.slider.api.proto.Messages.StopClusterRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.StopClusterRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.StopClusterRequestProto result = new org.apache.slider.api.proto.Messages.StopClusterRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.message_ = message_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.StopClusterRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.StopClusterRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.StopClusterRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.StopClusterRequestProto.getDefaultInstance()) return this; + if (other.hasMessage()) { + bitField0_ |= 0x00000001; + message_ = other.message_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasMessage()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.StopClusterRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.StopClusterRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string message = 1; + private java.lang.Object message_ = ""; + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public boolean hasMessage() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + message_ = value; + onChanged(); + return this; + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public Builder clearMessage() { + bitField0_ = (bitField0_ & ~0x00000001); + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + message_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.StopClusterRequestProto) + } + + static { + defaultInstance = new StopClusterRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.StopClusterRequestProto) + } + + public interface StopClusterResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.StopClusterResponseProto} + * + *
+   **
+   * stop the cluster
+   * 
+ */ + public static final class StopClusterResponseProto extends + com.google.protobuf.GeneratedMessage + implements StopClusterResponseProtoOrBuilder { + // Use StopClusterResponseProto.newBuilder() to construct. + private StopClusterResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private StopClusterResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final StopClusterResponseProto defaultInstance; + public static StopClusterResponseProto getDefaultInstance() { + return defaultInstance; + } + + public StopClusterResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StopClusterResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.StopClusterResponseProto.class, org.apache.slider.api.proto.Messages.StopClusterResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public StopClusterResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StopClusterResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.StopClusterResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.StopClusterResponseProto other = (org.apache.slider.api.proto.Messages.StopClusterResponseProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.StopClusterResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.StopClusterResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.StopClusterResponseProto} + * + *
+     **
+     * stop the cluster
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.StopClusterResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.StopClusterResponseProto.class, org.apache.slider.api.proto.Messages.StopClusterResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.StopClusterResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_StopClusterResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.StopClusterResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.StopClusterResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.StopClusterResponseProto build() { + org.apache.slider.api.proto.Messages.StopClusterResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.StopClusterResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.StopClusterResponseProto result = new org.apache.slider.api.proto.Messages.StopClusterResponseProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.StopClusterResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.StopClusterResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.StopClusterResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.StopClusterResponseProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.StopClusterResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.StopClusterResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.StopClusterResponseProto) + } + + static { + defaultInstance = new StopClusterResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.StopClusterResponseProto) + } + + public interface UpgradeContainersRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string message = 1; + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + boolean hasMessage(); + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + java.lang.String getMessage(); + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + com.google.protobuf.ByteString + getMessageBytes(); + + // repeated string container = 2; + /** + * repeated string container = 2; + */ + java.util.List + getContainerList(); + /** + * repeated string container = 2; + */ + int getContainerCount(); + /** + * repeated string container = 2; + */ + java.lang.String getContainer(int index); + /** + * repeated string container = 2; + */ + com.google.protobuf.ByteString + getContainerBytes(int index); + + // repeated string component = 3; + /** + * repeated string component = 3; + */ + java.util.List + getComponentList(); + /** + * repeated string component = 3; + */ + int getComponentCount(); + /** + * repeated string component = 3; + */ + java.lang.String getComponent(int index); + /** + * repeated string component = 3; + */ + com.google.protobuf.ByteString + getComponentBytes(int index); + } + /** + * Protobuf type {@code org.apache.slider.api.UpgradeContainersRequestProto} + * + *
+   **
+   * upgrade the containers
+   * 
+ */ + public static final class UpgradeContainersRequestProto extends + com.google.protobuf.GeneratedMessage + implements UpgradeContainersRequestProtoOrBuilder { + // Use UpgradeContainersRequestProto.newBuilder() to construct. + private UpgradeContainersRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private UpgradeContainersRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final UpgradeContainersRequestProto defaultInstance; + public static UpgradeContainersRequestProto getDefaultInstance() { + return defaultInstance; + } + + public UpgradeContainersRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpgradeContainersRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + message_ = input.readBytes(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + container_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + container_.add(input.readBytes()); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + component_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + component_.add(input.readBytes()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + container_ = new com.google.protobuf.UnmodifiableLazyStringList(container_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + component_ = new com.google.protobuf.UnmodifiableLazyStringList(component_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.class, org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public UpgradeContainersRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeContainersRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string message = 1; + public static final int MESSAGE_FIELD_NUMBER = 1; + private java.lang.Object message_; + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + public boolean hasMessage() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + message_ = s; + } + return s; + } + } + /** + * required string message = 1; + * + *
+     **
+     *message to include
+     * 
+ */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated string container = 2; + public static final int CONTAINER_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList container_; + /** + * repeated string container = 2; + */ + public java.util.List + getContainerList() { + return container_; + } + /** + * repeated string container = 2; + */ + public int getContainerCount() { + return container_.size(); + } + /** + * repeated string container = 2; + */ + public java.lang.String getContainer(int index) { + return container_.get(index); + } + /** + * repeated string container = 2; + */ + public com.google.protobuf.ByteString + getContainerBytes(int index) { + return container_.getByteString(index); + } + + // repeated string component = 3; + public static final int COMPONENT_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList component_; + /** + * repeated string component = 3; + */ + public java.util.List + getComponentList() { + return component_; + } + /** + * repeated string component = 3; + */ + public int getComponentCount() { + return component_.size(); + } + /** + * repeated string component = 3; + */ + public java.lang.String getComponent(int index) { + return component_.get(index); + } + /** + * repeated string component = 3; + */ + public com.google.protobuf.ByteString + getComponentBytes(int index) { + return component_.getByteString(index); + } + + private void initFields() { + message_ = ""; + container_ = com.google.protobuf.LazyStringArrayList.EMPTY; + component_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasMessage()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getMessageBytes()); + } + for (int i = 0; i < container_.size(); i++) { + output.writeBytes(2, container_.getByteString(i)); + } + for (int i = 0; i < component_.size(); i++) { + output.writeBytes(3, component_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getMessageBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < container_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(container_.getByteString(i)); + } + size += dataSize; + size += 1 * getContainerList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < component_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(component_.getByteString(i)); + } + size += dataSize; + size += 1 * getComponentList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto other = (org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto) obj; + + boolean result = true; + result = result && (hasMessage() == other.hasMessage()); + if (hasMessage()) { + result = result && getMessage() + .equals(other.getMessage()); + } + result = result && getContainerList() + .equals(other.getContainerList()); + result = result && getComponentList() + .equals(other.getComponentList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasMessage()) { + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + } + if (getContainerCount() > 0) { + hash = (37 * hash) + CONTAINER_FIELD_NUMBER; + hash = (53 * hash) + getContainerList().hashCode(); + } + if (getComponentCount() > 0) { + hash = (37 * hash) + COMPONENT_FIELD_NUMBER; + hash = (53 * hash) + getComponentList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.UpgradeContainersRequestProto} + * + *
+     **
+     * upgrade the containers
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.UpgradeContainersRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.class, org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + message_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + container_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + component_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto build() { + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto result = new org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.message_ = message_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + container_ = new com.google.protobuf.UnmodifiableLazyStringList( + container_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.container_ = container_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + component_ = new com.google.protobuf.UnmodifiableLazyStringList( + component_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.component_ = component_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.getDefaultInstance()) return this; + if (other.hasMessage()) { + bitField0_ |= 0x00000001; + message_ = other.message_; + onChanged(); + } + if (!other.container_.isEmpty()) { + if (container_.isEmpty()) { + container_ = other.container_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureContainerIsMutable(); + container_.addAll(other.container_); + } + onChanged(); + } + if (!other.component_.isEmpty()) { + if (component_.isEmpty()) { + component_ = other.component_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureComponentIsMutable(); + component_.addAll(other.component_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasMessage()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string message = 1; + private java.lang.Object message_ = ""; + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public boolean hasMessage() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + message_ = value; + onChanged(); + return this; + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public Builder clearMessage() { + bitField0_ = (bitField0_ & ~0x00000001); + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + * required string message = 1; + * + *
+       **
+       *message to include
+       * 
+ */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + message_ = value; + onChanged(); + return this; + } + + // repeated string container = 2; + private com.google.protobuf.LazyStringList container_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureContainerIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + container_ = new com.google.protobuf.LazyStringArrayList(container_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string container = 2; + */ + public java.util.List + getContainerList() { + return java.util.Collections.unmodifiableList(container_); + } + /** + * repeated string container = 2; + */ + public int getContainerCount() { + return container_.size(); + } + /** + * repeated string container = 2; + */ + public java.lang.String getContainer(int index) { + return container_.get(index); + } + /** + * repeated string container = 2; + */ + public com.google.protobuf.ByteString + getContainerBytes(int index) { + return container_.getByteString(index); + } + /** + * repeated string container = 2; + */ + public Builder setContainer( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerIsMutable(); + container_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string container = 2; + */ + public Builder addContainer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerIsMutable(); + container_.add(value); + onChanged(); + return this; + } + /** + * repeated string container = 2; + */ + public Builder addAllContainer( + java.lang.Iterable values) { + ensureContainerIsMutable(); + super.addAll(values, container_); + onChanged(); + return this; + } + /** + * repeated string container = 2; + */ + public Builder clearContainer() { + container_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string container = 2; + */ + public Builder addContainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerIsMutable(); + container_.add(value); + onChanged(); + return this; + } + + // repeated string component = 3; + private com.google.protobuf.LazyStringList component_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureComponentIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + component_ = new com.google.protobuf.LazyStringArrayList(component_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated string component = 3; + */ + public java.util.List + getComponentList() { + return java.util.Collections.unmodifiableList(component_); + } + /** + * repeated string component = 3; + */ + public int getComponentCount() { + return component_.size(); + } + /** + * repeated string component = 3; + */ + public java.lang.String getComponent(int index) { + return component_.get(index); + } + /** + * repeated string component = 3; + */ + public com.google.protobuf.ByteString + getComponentBytes(int index) { + return component_.getByteString(index); + } + /** + * repeated string component = 3; + */ + public Builder setComponent( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentIsMutable(); + component_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string component = 3; + */ + public Builder addComponent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentIsMutable(); + component_.add(value); + onChanged(); + return this; + } + /** + * repeated string component = 3; + */ + public Builder addAllComponent( + java.lang.Iterable values) { + ensureComponentIsMutable(); + super.addAll(values, component_); + onChanged(); + return this; + } + /** + * repeated string component = 3; + */ + public Builder clearComponent() { + component_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * repeated string component = 3; + */ + public Builder addComponentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentIsMutable(); + component_.add(value); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.UpgradeContainersRequestProto) + } + + static { + defaultInstance = new UpgradeContainersRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.UpgradeContainersRequestProto) + } + + public interface UpgradeContainersResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.UpgradeContainersResponseProto} + * + *
+   **
+   * upgrade the containers
+   * 
+ */ + public static final class UpgradeContainersResponseProto extends + com.google.protobuf.GeneratedMessage + implements UpgradeContainersResponseProtoOrBuilder { + // Use UpgradeContainersResponseProto.newBuilder() to construct. + private UpgradeContainersResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private UpgradeContainersResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final UpgradeContainersResponseProto defaultInstance; + public static UpgradeContainersResponseProto getDefaultInstance() { + return defaultInstance; + } + + public UpgradeContainersResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpgradeContainersResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.class, org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public UpgradeContainersResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeContainersResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto other = (org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.UpgradeContainersResponseProto} + * + *
+     **
+     * upgrade the containers
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.UpgradeContainersResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.class, org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_UpgradeContainersResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto build() { + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto result = new org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.UpgradeContainersResponseProto) + } + + static { + defaultInstance = new UpgradeContainersResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.UpgradeContainersResponseProto) + } + + public interface FlexClusterRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string clusterSpec = 1; + /** + * required string clusterSpec = 1; + */ + boolean hasClusterSpec(); + /** + * required string clusterSpec = 1; + */ + java.lang.String getClusterSpec(); + /** + * required string clusterSpec = 1; + */ + com.google.protobuf.ByteString + getClusterSpecBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.FlexClusterRequestProto} + * + *
+   **
+   * flex the cluster
+   * 
+ */ + public static final class FlexClusterRequestProto extends + com.google.protobuf.GeneratedMessage + implements FlexClusterRequestProtoOrBuilder { + // Use FlexClusterRequestProto.newBuilder() to construct. + private FlexClusterRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private FlexClusterRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final FlexClusterRequestProto defaultInstance; + public static FlexClusterRequestProto getDefaultInstance() { + return defaultInstance; + } + + public FlexClusterRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FlexClusterRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + clusterSpec_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.FlexClusterRequestProto.class, org.apache.slider.api.proto.Messages.FlexClusterRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public FlexClusterRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FlexClusterRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string clusterSpec = 1; + public static final int CLUSTERSPEC_FIELD_NUMBER = 1; + private java.lang.Object clusterSpec_; + /** + * required string clusterSpec = 1; + */ + public boolean hasClusterSpec() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string clusterSpec = 1; + */ + public java.lang.String getClusterSpec() { + java.lang.Object ref = clusterSpec_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + clusterSpec_ = s; + } + return s; + } + } + /** + * required string clusterSpec = 1; + */ + public com.google.protobuf.ByteString + getClusterSpecBytes() { + java.lang.Object ref = clusterSpec_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clusterSpec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + clusterSpec_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasClusterSpec()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getClusterSpecBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getClusterSpecBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.FlexClusterRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.FlexClusterRequestProto other = (org.apache.slider.api.proto.Messages.FlexClusterRequestProto) obj; + + boolean result = true; + result = result && (hasClusterSpec() == other.hasClusterSpec()); + if (hasClusterSpec()) { + result = result && getClusterSpec() + .equals(other.getClusterSpec()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasClusterSpec()) { + hash = (37 * hash) + CLUSTERSPEC_FIELD_NUMBER; + hash = (53 * hash) + getClusterSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.FlexClusterRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.FlexClusterRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.FlexClusterRequestProto} + * + *
+     **
+     * flex the cluster
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.FlexClusterRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.FlexClusterRequestProto.class, org.apache.slider.api.proto.Messages.FlexClusterRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.FlexClusterRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + clusterSpec_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.FlexClusterRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.FlexClusterRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.FlexClusterRequestProto build() { + org.apache.slider.api.proto.Messages.FlexClusterRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.FlexClusterRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.FlexClusterRequestProto result = new org.apache.slider.api.proto.Messages.FlexClusterRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.clusterSpec_ = clusterSpec_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.FlexClusterRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.FlexClusterRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.FlexClusterRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.FlexClusterRequestProto.getDefaultInstance()) return this; + if (other.hasClusterSpec()) { + bitField0_ |= 0x00000001; + clusterSpec_ = other.clusterSpec_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasClusterSpec()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.FlexClusterRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.FlexClusterRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string clusterSpec = 1; + private java.lang.Object clusterSpec_ = ""; + /** + * required string clusterSpec = 1; + */ + public boolean hasClusterSpec() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string clusterSpec = 1; + */ + public java.lang.String getClusterSpec() { + java.lang.Object ref = clusterSpec_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + clusterSpec_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string clusterSpec = 1; + */ + public com.google.protobuf.ByteString + getClusterSpecBytes() { + java.lang.Object ref = clusterSpec_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clusterSpec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string clusterSpec = 1; + */ + public Builder setClusterSpec( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + clusterSpec_ = value; + onChanged(); + return this; + } + /** + * required string clusterSpec = 1; + */ + public Builder clearClusterSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + clusterSpec_ = getDefaultInstance().getClusterSpec(); + onChanged(); + return this; + } + /** + * required string clusterSpec = 1; + */ + public Builder setClusterSpecBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + clusterSpec_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.FlexClusterRequestProto) + } + + static { + defaultInstance = new FlexClusterRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.FlexClusterRequestProto) + } + + public interface FlexClusterResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required bool response = 1; + /** + * required bool response = 1; + */ + boolean hasResponse(); + /** + * required bool response = 1; + */ + boolean getResponse(); + } + /** + * Protobuf type {@code org.apache.slider.api.FlexClusterResponseProto} + * + *
+   **
+   * flex the cluster
+   * 
+ */ + public static final class FlexClusterResponseProto extends + com.google.protobuf.GeneratedMessage + implements FlexClusterResponseProtoOrBuilder { + // Use FlexClusterResponseProto.newBuilder() to construct. + private FlexClusterResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private FlexClusterResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final FlexClusterResponseProto defaultInstance; + public static FlexClusterResponseProto getDefaultInstance() { + return defaultInstance; + } + + public FlexClusterResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FlexClusterResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + response_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.FlexClusterResponseProto.class, org.apache.slider.api.proto.Messages.FlexClusterResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public FlexClusterResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FlexClusterResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required bool response = 1; + public static final int RESPONSE_FIELD_NUMBER = 1; + private boolean response_; + /** + * required bool response = 1; + */ + public boolean hasResponse() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required bool response = 1; + */ + public boolean getResponse() { + return response_; + } + + private void initFields() { + response_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasResponse()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, response_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, response_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.FlexClusterResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.FlexClusterResponseProto other = (org.apache.slider.api.proto.Messages.FlexClusterResponseProto) obj; + + boolean result = true; + result = result && (hasResponse() == other.hasResponse()); + if (hasResponse()) { + result = result && (getResponse() + == other.getResponse()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasResponse()) { + hash = (37 * hash) + RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getResponse()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.FlexClusterResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.FlexClusterResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.FlexClusterResponseProto} + * + *
+     **
+     * flex the cluster
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.FlexClusterResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.FlexClusterResponseProto.class, org.apache.slider.api.proto.Messages.FlexClusterResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.FlexClusterResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + response_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_FlexClusterResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.FlexClusterResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.FlexClusterResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.FlexClusterResponseProto build() { + org.apache.slider.api.proto.Messages.FlexClusterResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.FlexClusterResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.FlexClusterResponseProto result = new org.apache.slider.api.proto.Messages.FlexClusterResponseProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.response_ = response_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.FlexClusterResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.FlexClusterResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.FlexClusterResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.FlexClusterResponseProto.getDefaultInstance()) return this; + if (other.hasResponse()) { + setResponse(other.getResponse()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasResponse()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.FlexClusterResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.FlexClusterResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required bool response = 1; + private boolean response_ ; + /** + * required bool response = 1; + */ + public boolean hasResponse() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required bool response = 1; + */ + public boolean getResponse() { + return response_; + } + /** + * required bool response = 1; + */ + public Builder setResponse(boolean value) { + bitField0_ |= 0x00000001; + response_ = value; + onChanged(); + return this; + } + /** + * required bool response = 1; + */ + public Builder clearResponse() { + bitField0_ = (bitField0_ & ~0x00000001); + response_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.FlexClusterResponseProto) + } + + static { + defaultInstance = new FlexClusterResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.FlexClusterResponseProto) + } + + public interface GetJSONClusterStatusRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetJSONClusterStatusRequestProto} + * + *
+   **
+   * void request
+   * 
+ */ + public static final class GetJSONClusterStatusRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetJSONClusterStatusRequestProtoOrBuilder { + // Use GetJSONClusterStatusRequestProto.newBuilder() to construct. + private GetJSONClusterStatusRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetJSONClusterStatusRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetJSONClusterStatusRequestProto defaultInstance; + public static GetJSONClusterStatusRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetJSONClusterStatusRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetJSONClusterStatusRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.class, org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetJSONClusterStatusRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetJSONClusterStatusRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto other = (org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetJSONClusterStatusRequestProto} + * + *
+     **
+     * void request
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.class, org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto build() { + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto result = new org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetJSONClusterStatusRequestProto) + } + + static { + defaultInstance = new GetJSONClusterStatusRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetJSONClusterStatusRequestProto) + } + + public interface GetJSONClusterStatusResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string clusterSpec = 1; + /** + * required string clusterSpec = 1; + */ + boolean hasClusterSpec(); + /** + * required string clusterSpec = 1; + */ + java.lang.String getClusterSpec(); + /** + * required string clusterSpec = 1; + */ + com.google.protobuf.ByteString + getClusterSpecBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetJSONClusterStatusResponseProto} + * + *
+   **
+   * response
+   * 
+ */ + public static final class GetJSONClusterStatusResponseProto extends + com.google.protobuf.GeneratedMessage + implements GetJSONClusterStatusResponseProtoOrBuilder { + // Use GetJSONClusterStatusResponseProto.newBuilder() to construct. + private GetJSONClusterStatusResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetJSONClusterStatusResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetJSONClusterStatusResponseProto defaultInstance; + public static GetJSONClusterStatusResponseProto getDefaultInstance() { + return defaultInstance; + } + + public GetJSONClusterStatusResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetJSONClusterStatusResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + clusterSpec_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.class, org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetJSONClusterStatusResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetJSONClusterStatusResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string clusterSpec = 1; + public static final int CLUSTERSPEC_FIELD_NUMBER = 1; + private java.lang.Object clusterSpec_; + /** + * required string clusterSpec = 1; + */ + public boolean hasClusterSpec() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string clusterSpec = 1; + */ + public java.lang.String getClusterSpec() { + java.lang.Object ref = clusterSpec_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + clusterSpec_ = s; + } + return s; + } + } + /** + * required string clusterSpec = 1; + */ + public com.google.protobuf.ByteString + getClusterSpecBytes() { + java.lang.Object ref = clusterSpec_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clusterSpec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + clusterSpec_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasClusterSpec()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getClusterSpecBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getClusterSpecBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto other = (org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto) obj; + + boolean result = true; + result = result && (hasClusterSpec() == other.hasClusterSpec()); + if (hasClusterSpec()) { + result = result && getClusterSpec() + .equals(other.getClusterSpec()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasClusterSpec()) { + hash = (37 * hash) + CLUSTERSPEC_FIELD_NUMBER; + hash = (53 * hash) + getClusterSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetJSONClusterStatusResponseProto} + * + *
+     **
+     * response
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.class, org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + clusterSpec_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto build() { + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto result = new org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.clusterSpec_ = clusterSpec_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.getDefaultInstance()) return this; + if (other.hasClusterSpec()) { + bitField0_ |= 0x00000001; + clusterSpec_ = other.clusterSpec_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasClusterSpec()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string clusterSpec = 1; + private java.lang.Object clusterSpec_ = ""; + /** + * required string clusterSpec = 1; + */ + public boolean hasClusterSpec() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string clusterSpec = 1; + */ + public java.lang.String getClusterSpec() { + java.lang.Object ref = clusterSpec_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + clusterSpec_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string clusterSpec = 1; + */ + public com.google.protobuf.ByteString + getClusterSpecBytes() { + java.lang.Object ref = clusterSpec_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clusterSpec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string clusterSpec = 1; + */ + public Builder setClusterSpec( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + clusterSpec_ = value; + onChanged(); + return this; + } + /** + * required string clusterSpec = 1; + */ + public Builder clearClusterSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + clusterSpec_ = getDefaultInstance().getClusterSpec(); + onChanged(); + return this; + } + /** + * required string clusterSpec = 1; + */ + public Builder setClusterSpecBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + clusterSpec_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetJSONClusterStatusResponseProto) + } + + static { + defaultInstance = new GetJSONClusterStatusResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetJSONClusterStatusResponseProto) + } + + public interface ListNodeUUIDsByRoleRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string role = 1; + /** + * required string role = 1; + */ + boolean hasRole(); + /** + * required string role = 1; + */ + java.lang.String getRole(); + /** + * required string role = 1; + */ + com.google.protobuf.ByteString + getRoleBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.ListNodeUUIDsByRoleRequestProto} + * + *
+   **
+   * list the nodes in a role
+   * 
+ */ + public static final class ListNodeUUIDsByRoleRequestProto extends + com.google.protobuf.GeneratedMessage + implements ListNodeUUIDsByRoleRequestProtoOrBuilder { + // Use ListNodeUUIDsByRoleRequestProto.newBuilder() to construct. + private ListNodeUUIDsByRoleRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ListNodeUUIDsByRoleRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ListNodeUUIDsByRoleRequestProto defaultInstance; + public static ListNodeUUIDsByRoleRequestProto getDefaultInstance() { + return defaultInstance; + } + + public ListNodeUUIDsByRoleRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListNodeUUIDsByRoleRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + role_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.class, org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ListNodeUUIDsByRoleRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListNodeUUIDsByRoleRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string role = 1; + public static final int ROLE_FIELD_NUMBER = 1; + private java.lang.Object role_; + /** + * required string role = 1; + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string role = 1; + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + role_ = s; + } + return s; + } + } + /** + * required string role = 1; + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + role_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRole()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getRoleBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getRoleBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto other = (org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto) obj; + + boolean result = true; + result = result && (hasRole() == other.hasRole()); + if (hasRole()) { + result = result && getRole() + .equals(other.getRole()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasRole()) { + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.ListNodeUUIDsByRoleRequestProto} + * + *
+     **
+     * list the nodes in a role
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.class, org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + role_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto build() { + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto result = new org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.role_ = role_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.getDefaultInstance()) return this; + if (other.hasRole()) { + bitField0_ |= 0x00000001; + role_ = other.role_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRole()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string role = 1; + private java.lang.Object role_ = ""; + /** + * required string role = 1; + */ + public boolean hasRole() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string role = 1; + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + role_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string role = 1; + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string role = 1; + */ + public Builder setRole( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + role_ = value; + onChanged(); + return this; + } + /** + * required string role = 1; + */ + public Builder clearRole() { + bitField0_ = (bitField0_ & ~0x00000001); + role_ = getDefaultInstance().getRole(); + onChanged(); + return this; + } + /** + * required string role = 1; + */ + public Builder setRoleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + role_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.ListNodeUUIDsByRoleRequestProto) + } + + static { + defaultInstance = new ListNodeUUIDsByRoleRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.ListNodeUUIDsByRoleRequestProto) + } + + public interface ListNodeUUIDsByRoleResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated string uuid = 1; + /** + * repeated string uuid = 1; + */ + java.util.List + getUuidList(); + /** + * repeated string uuid = 1; + */ + int getUuidCount(); + /** + * repeated string uuid = 1; + */ + java.lang.String getUuid(int index); + /** + * repeated string uuid = 1; + */ + com.google.protobuf.ByteString + getUuidBytes(int index); + } + /** + * Protobuf type {@code org.apache.slider.api.ListNodeUUIDsByRoleResponseProto} + * + *
+   **
+   * list the nodes in a role
+   * 
+ */ + public static final class ListNodeUUIDsByRoleResponseProto extends + com.google.protobuf.GeneratedMessage + implements ListNodeUUIDsByRoleResponseProtoOrBuilder { + // Use ListNodeUUIDsByRoleResponseProto.newBuilder() to construct. + private ListNodeUUIDsByRoleResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ListNodeUUIDsByRoleResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ListNodeUUIDsByRoleResponseProto defaultInstance; + public static ListNodeUUIDsByRoleResponseProto getDefaultInstance() { + return defaultInstance; + } + + public ListNodeUUIDsByRoleResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListNodeUUIDsByRoleResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + uuid_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + uuid_.add(input.readBytes()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + uuid_ = new com.google.protobuf.UnmodifiableLazyStringList(uuid_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.class, org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ListNodeUUIDsByRoleResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListNodeUUIDsByRoleResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + // repeated string uuid = 1; + public static final int UUID_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList uuid_; + /** + * repeated string uuid = 1; + */ + public java.util.List + getUuidList() { + return uuid_; + } + /** + * repeated string uuid = 1; + */ + public int getUuidCount() { + return uuid_.size(); + } + /** + * repeated string uuid = 1; + */ + public java.lang.String getUuid(int index) { + return uuid_.get(index); + } + /** + * repeated string uuid = 1; + */ + public com.google.protobuf.ByteString + getUuidBytes(int index) { + return uuid_.getByteString(index); + } + + private void initFields() { + uuid_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < uuid_.size(); i++) { + output.writeBytes(1, uuid_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < uuid_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(uuid_.getByteString(i)); + } + size += dataSize; + size += 1 * getUuidList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto other = (org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto) obj; + + boolean result = true; + result = result && getUuidList() + .equals(other.getUuidList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getUuidCount() > 0) { + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuidList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.ListNodeUUIDsByRoleResponseProto} + * + *
+     **
+     * list the nodes in a role
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.class, org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + uuid_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto build() { + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto result = new org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + uuid_ = new com.google.protobuf.UnmodifiableLazyStringList( + uuid_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.uuid_ = uuid_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.getDefaultInstance()) return this; + if (!other.uuid_.isEmpty()) { + if (uuid_.isEmpty()) { + uuid_ = other.uuid_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUuidIsMutable(); + uuid_.addAll(other.uuid_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated string uuid = 1; + private com.google.protobuf.LazyStringList uuid_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUuidIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + uuid_ = new com.google.protobuf.LazyStringArrayList(uuid_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string uuid = 1; + */ + public java.util.List + getUuidList() { + return java.util.Collections.unmodifiableList(uuid_); + } + /** + * repeated string uuid = 1; + */ + public int getUuidCount() { + return uuid_.size(); + } + /** + * repeated string uuid = 1; + */ + public java.lang.String getUuid(int index) { + return uuid_.get(index); + } + /** + * repeated string uuid = 1; + */ + public com.google.protobuf.ByteString + getUuidBytes(int index) { + return uuid_.getByteString(index); + } + /** + * repeated string uuid = 1; + */ + public Builder setUuid( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUuidIsMutable(); + uuid_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string uuid = 1; + */ + public Builder addUuid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUuidIsMutable(); + uuid_.add(value); + onChanged(); + return this; + } + /** + * repeated string uuid = 1; + */ + public Builder addAllUuid( + java.lang.Iterable values) { + ensureUuidIsMutable(); + super.addAll(values, uuid_); + onChanged(); + return this; + } + /** + * repeated string uuid = 1; + */ + public Builder clearUuid() { + uuid_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string uuid = 1; + */ + public Builder addUuidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUuidIsMutable(); + uuid_.add(value); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.ListNodeUUIDsByRoleResponseProto) + } + + static { + defaultInstance = new ListNodeUUIDsByRoleResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.ListNodeUUIDsByRoleResponseProto) + } + + public interface GetNodeRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string uuid = 1; + /** + * required string uuid = 1; + */ + boolean hasUuid(); + /** + * required string uuid = 1; + */ + java.lang.String getUuid(); + /** + * required string uuid = 1; + */ + com.google.protobuf.ByteString + getUuidBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetNodeRequestProto} + * + *
+   **
+   * get a node
+   * 
+ */ + public static final class GetNodeRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetNodeRequestProtoOrBuilder { + // Use GetNodeRequestProto.newBuilder() to construct. + private GetNodeRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetNodeRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetNodeRequestProto defaultInstance; + public static GetNodeRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetNodeRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetNodeRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + uuid_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetNodeRequestProto.class, org.apache.slider.api.proto.Messages.GetNodeRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetNodeRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetNodeRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string uuid = 1; + public static final int UUID_FIELD_NUMBER = 1; + private java.lang.Object uuid_; + /** + * required string uuid = 1; + */ + public boolean hasUuid() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string uuid = 1; + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + uuid_ = s; + } + return s; + } + } + /** + * required string uuid = 1; + */ + public com.google.protobuf.ByteString + getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + uuid_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasUuid()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getUuidBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getUuidBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetNodeRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetNodeRequestProto other = (org.apache.slider.api.proto.Messages.GetNodeRequestProto) obj; + + boolean result = true; + result = result && (hasUuid() == other.hasUuid()); + if (hasUuid()) { + result = result && getUuid() + .equals(other.getUuid()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasUuid()) { + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetNodeRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetNodeRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetNodeRequestProto} + * + *
+     **
+     * get a node
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetNodeRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetNodeRequestProto.class, org.apache.slider.api.proto.Messages.GetNodeRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetNodeRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + uuid_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetNodeRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetNodeRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetNodeRequestProto build() { + org.apache.slider.api.proto.Messages.GetNodeRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetNodeRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetNodeRequestProto result = new org.apache.slider.api.proto.Messages.GetNodeRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.uuid_ = uuid_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetNodeRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetNodeRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetNodeRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetNodeRequestProto.getDefaultInstance()) return this; + if (other.hasUuid()) { + bitField0_ |= 0x00000001; + uuid_ = other.uuid_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasUuid()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetNodeRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetNodeRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string uuid = 1; + private java.lang.Object uuid_ = ""; + /** + * required string uuid = 1; + */ + public boolean hasUuid() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string uuid = 1; + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string uuid = 1; + */ + public com.google.protobuf.ByteString + getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string uuid = 1; + */ + public Builder setUuid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + uuid_ = value; + onChanged(); + return this; + } + /** + * required string uuid = 1; + */ + public Builder clearUuid() { + bitField0_ = (bitField0_ & ~0x00000001); + uuid_ = getDefaultInstance().getUuid(); + onChanged(); + return this; + } + /** + * required string uuid = 1; + */ + public Builder setUuidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + uuid_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetNodeRequestProto) + } + + static { + defaultInstance = new GetNodeRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetNodeRequestProto) + } + + public interface GetNodeResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + boolean hasClusterNode(); + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + org.apache.slider.api.proto.Messages.RoleInstanceState getClusterNode(); + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder getClusterNodeOrBuilder(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetNodeResponseProto} + * + *
+   **
+   * response on a node
+   * 
+ */ + public static final class GetNodeResponseProto extends + com.google.protobuf.GeneratedMessage + implements GetNodeResponseProtoOrBuilder { + // Use GetNodeResponseProto.newBuilder() to construct. + private GetNodeResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetNodeResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetNodeResponseProto defaultInstance; + public static GetNodeResponseProto getDefaultInstance() { + return defaultInstance; + } + + public GetNodeResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetNodeResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + org.apache.slider.api.proto.Messages.RoleInstanceState.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = clusterNode_.toBuilder(); + } + clusterNode_ = input.readMessage(org.apache.slider.api.proto.Messages.RoleInstanceState.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(clusterNode_); + clusterNode_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetNodeResponseProto.class, org.apache.slider.api.proto.Messages.GetNodeResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetNodeResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetNodeResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + public static final int CLUSTERNODE_FIELD_NUMBER = 1; + private org.apache.slider.api.proto.Messages.RoleInstanceState clusterNode_; + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public boolean hasClusterNode() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceState getClusterNode() { + return clusterNode_; + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder getClusterNodeOrBuilder() { + return clusterNode_; + } + + private void initFields() { + clusterNode_ = org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasClusterNode()) { + memoizedIsInitialized = 0; + return false; + } + if (!getClusterNode().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, clusterNode_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, clusterNode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetNodeResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetNodeResponseProto other = (org.apache.slider.api.proto.Messages.GetNodeResponseProto) obj; + + boolean result = true; + result = result && (hasClusterNode() == other.hasClusterNode()); + if (hasClusterNode()) { + result = result && getClusterNode() + .equals(other.getClusterNode()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasClusterNode()) { + hash = (37 * hash) + CLUSTERNODE_FIELD_NUMBER; + hash = (53 * hash) + getClusterNode().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetNodeResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetNodeResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetNodeResponseProto} + * + *
+     **
+     * response on a node
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetNodeResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetNodeResponseProto.class, org.apache.slider.api.proto.Messages.GetNodeResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetNodeResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getClusterNodeFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (clusterNodeBuilder_ == null) { + clusterNode_ = org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance(); + } else { + clusterNodeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetNodeResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetNodeResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetNodeResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetNodeResponseProto build() { + org.apache.slider.api.proto.Messages.GetNodeResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetNodeResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.GetNodeResponseProto result = new org.apache.slider.api.proto.Messages.GetNodeResponseProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (clusterNodeBuilder_ == null) { + result.clusterNode_ = clusterNode_; + } else { + result.clusterNode_ = clusterNodeBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetNodeResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetNodeResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetNodeResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.GetNodeResponseProto.getDefaultInstance()) return this; + if (other.hasClusterNode()) { + mergeClusterNode(other.getClusterNode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasClusterNode()) { + + return false; + } + if (!getClusterNode().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetNodeResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetNodeResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + private org.apache.slider.api.proto.Messages.RoleInstanceState clusterNode_ = org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.slider.api.proto.Messages.RoleInstanceState, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder, org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder> clusterNodeBuilder_; + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public boolean hasClusterNode() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceState getClusterNode() { + if (clusterNodeBuilder_ == null) { + return clusterNode_; + } else { + return clusterNodeBuilder_.getMessage(); + } + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder setClusterNode(org.apache.slider.api.proto.Messages.RoleInstanceState value) { + if (clusterNodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clusterNode_ = value; + onChanged(); + } else { + clusterNodeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder setClusterNode( + org.apache.slider.api.proto.Messages.RoleInstanceState.Builder builderForValue) { + if (clusterNodeBuilder_ == null) { + clusterNode_ = builderForValue.build(); + onChanged(); + } else { + clusterNodeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder mergeClusterNode(org.apache.slider.api.proto.Messages.RoleInstanceState value) { + if (clusterNodeBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + clusterNode_ != org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance()) { + clusterNode_ = + org.apache.slider.api.proto.Messages.RoleInstanceState.newBuilder(clusterNode_).mergeFrom(value).buildPartial(); + } else { + clusterNode_ = value; + } + onChanged(); + } else { + clusterNodeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder clearClusterNode() { + if (clusterNodeBuilder_ == null) { + clusterNode_ = org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance(); + onChanged(); + } else { + clusterNodeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceState.Builder getClusterNodeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getClusterNodeFieldBuilder().getBuilder(); + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder getClusterNodeOrBuilder() { + if (clusterNodeBuilder_ != null) { + return clusterNodeBuilder_.getMessageOrBuilder(); + } else { + return clusterNode_; + } + } + /** + * required .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + org.apache.slider.api.proto.Messages.RoleInstanceState, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder, org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder> + getClusterNodeFieldBuilder() { + if (clusterNodeBuilder_ == null) { + clusterNodeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.slider.api.proto.Messages.RoleInstanceState, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder, org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder>( + clusterNode_, + getParentForChildren(), + isClean()); + clusterNode_ = null; + } + return clusterNodeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetNodeResponseProto) + } + + static { + defaultInstance = new GetNodeResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetNodeResponseProto) + } + + public interface GetClusterNodesRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated string uuid = 1; + /** + * repeated string uuid = 1; + */ + java.util.List + getUuidList(); + /** + * repeated string uuid = 1; + */ + int getUuidCount(); + /** + * repeated string uuid = 1; + */ + java.lang.String getUuid(int index); + /** + * repeated string uuid = 1; + */ + com.google.protobuf.ByteString + getUuidBytes(int index); + } + /** + * Protobuf type {@code org.apache.slider.api.GetClusterNodesRequestProto} + * + *
+   **
+   * list the nodes for the UUDs
+   * 
+ */ + public static final class GetClusterNodesRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetClusterNodesRequestProtoOrBuilder { + // Use GetClusterNodesRequestProto.newBuilder() to construct. + private GetClusterNodesRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetClusterNodesRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetClusterNodesRequestProto defaultInstance; + public static GetClusterNodesRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetClusterNodesRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetClusterNodesRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + uuid_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + uuid_.add(input.readBytes()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + uuid_ = new com.google.protobuf.UnmodifiableLazyStringList(uuid_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.class, org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetClusterNodesRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetClusterNodesRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + // repeated string uuid = 1; + public static final int UUID_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList uuid_; + /** + * repeated string uuid = 1; + */ + public java.util.List + getUuidList() { + return uuid_; + } + /** + * repeated string uuid = 1; + */ + public int getUuidCount() { + return uuid_.size(); + } + /** + * repeated string uuid = 1; + */ + public java.lang.String getUuid(int index) { + return uuid_.get(index); + } + /** + * repeated string uuid = 1; + */ + public com.google.protobuf.ByteString + getUuidBytes(int index) { + return uuid_.getByteString(index); + } + + private void initFields() { + uuid_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < uuid_.size(); i++) { + output.writeBytes(1, uuid_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < uuid_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(uuid_.getByteString(i)); + } + size += dataSize; + size += 1 * getUuidList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto other = (org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto) obj; + + boolean result = true; + result = result && getUuidList() + .equals(other.getUuidList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getUuidCount() > 0) { + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuidList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetClusterNodesRequestProto} + * + *
+     **
+     * list the nodes for the UUDs
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetClusterNodesRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.class, org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + uuid_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto build() { + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto result = new org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + uuid_ = new com.google.protobuf.UnmodifiableLazyStringList( + uuid_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.uuid_ = uuid_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.getDefaultInstance()) return this; + if (!other.uuid_.isEmpty()) { + if (uuid_.isEmpty()) { + uuid_ = other.uuid_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUuidIsMutable(); + uuid_.addAll(other.uuid_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated string uuid = 1; + private com.google.protobuf.LazyStringList uuid_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUuidIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + uuid_ = new com.google.protobuf.LazyStringArrayList(uuid_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string uuid = 1; + */ + public java.util.List + getUuidList() { + return java.util.Collections.unmodifiableList(uuid_); + } + /** + * repeated string uuid = 1; + */ + public int getUuidCount() { + return uuid_.size(); + } + /** + * repeated string uuid = 1; + */ + public java.lang.String getUuid(int index) { + return uuid_.get(index); + } + /** + * repeated string uuid = 1; + */ + public com.google.protobuf.ByteString + getUuidBytes(int index) { + return uuid_.getByteString(index); + } + /** + * repeated string uuid = 1; + */ + public Builder setUuid( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUuidIsMutable(); + uuid_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string uuid = 1; + */ + public Builder addUuid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUuidIsMutable(); + uuid_.add(value); + onChanged(); + return this; + } + /** + * repeated string uuid = 1; + */ + public Builder addAllUuid( + java.lang.Iterable values) { + ensureUuidIsMutable(); + super.addAll(values, uuid_); + onChanged(); + return this; + } + /** + * repeated string uuid = 1; + */ + public Builder clearUuid() { + uuid_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string uuid = 1; + */ + public Builder addUuidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUuidIsMutable(); + uuid_.add(value); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetClusterNodesRequestProto) + } + + static { + defaultInstance = new GetClusterNodesRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetClusterNodesRequestProto) + } + + public interface GetClusterNodesResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + java.util.List + getClusterNodeList(); + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + org.apache.slider.api.proto.Messages.RoleInstanceState getClusterNode(int index); + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + int getClusterNodeCount(); + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + java.util.List + getClusterNodeOrBuilderList(); + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder getClusterNodeOrBuilder( + int index); + } + /** + * Protobuf type {@code org.apache.slider.api.GetClusterNodesResponseProto} + * + *
+   **
+   * list the nodes in a role
+   * 
+ */ + public static final class GetClusterNodesResponseProto extends + com.google.protobuf.GeneratedMessage + implements GetClusterNodesResponseProtoOrBuilder { + // Use GetClusterNodesResponseProto.newBuilder() to construct. + private GetClusterNodesResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetClusterNodesResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetClusterNodesResponseProto defaultInstance; + public static GetClusterNodesResponseProto getDefaultInstance() { + return defaultInstance; + } + + public GetClusterNodesResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetClusterNodesResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + clusterNode_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + clusterNode_.add(input.readMessage(org.apache.slider.api.proto.Messages.RoleInstanceState.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + clusterNode_ = java.util.Collections.unmodifiableList(clusterNode_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.class, org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetClusterNodesResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetClusterNodesResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + // repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + public static final int CLUSTERNODE_FIELD_NUMBER = 1; + private java.util.List clusterNode_; + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public java.util.List getClusterNodeList() { + return clusterNode_; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public java.util.List + getClusterNodeOrBuilderList() { + return clusterNode_; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public int getClusterNodeCount() { + return clusterNode_.size(); + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceState getClusterNode(int index) { + return clusterNode_.get(index); + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder getClusterNodeOrBuilder( + int index) { + return clusterNode_.get(index); + } + + private void initFields() { + clusterNode_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getClusterNodeCount(); i++) { + if (!getClusterNode(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < clusterNode_.size(); i++) { + output.writeMessage(1, clusterNode_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < clusterNode_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, clusterNode_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto other = (org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto) obj; + + boolean result = true; + result = result && getClusterNodeList() + .equals(other.getClusterNodeList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getClusterNodeCount() > 0) { + hash = (37 * hash) + CLUSTERNODE_FIELD_NUMBER; + hash = (53 * hash) + getClusterNodeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetClusterNodesResponseProto} + * + *
+     **
+     * list the nodes in a role
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetClusterNodesResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.class, org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getClusterNodeFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (clusterNodeBuilder_ == null) { + clusterNode_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + clusterNodeBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetClusterNodesResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto build() { + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto result = new org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto(this); + int from_bitField0_ = bitField0_; + if (clusterNodeBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + clusterNode_ = java.util.Collections.unmodifiableList(clusterNode_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.clusterNode_ = clusterNode_; + } else { + result.clusterNode_ = clusterNodeBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.getDefaultInstance()) return this; + if (clusterNodeBuilder_ == null) { + if (!other.clusterNode_.isEmpty()) { + if (clusterNode_.isEmpty()) { + clusterNode_ = other.clusterNode_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureClusterNodeIsMutable(); + clusterNode_.addAll(other.clusterNode_); + } + onChanged(); + } + } else { + if (!other.clusterNode_.isEmpty()) { + if (clusterNodeBuilder_.isEmpty()) { + clusterNodeBuilder_.dispose(); + clusterNodeBuilder_ = null; + clusterNode_ = other.clusterNode_; + bitField0_ = (bitField0_ & ~0x00000001); + clusterNodeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getClusterNodeFieldBuilder() : null; + } else { + clusterNodeBuilder_.addAllMessages(other.clusterNode_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getClusterNodeCount(); i++) { + if (!getClusterNode(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + private java.util.List clusterNode_ = + java.util.Collections.emptyList(); + private void ensureClusterNodeIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + clusterNode_ = new java.util.ArrayList(clusterNode_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.RoleInstanceState, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder, org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder> clusterNodeBuilder_; + + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public java.util.List getClusterNodeList() { + if (clusterNodeBuilder_ == null) { + return java.util.Collections.unmodifiableList(clusterNode_); + } else { + return clusterNodeBuilder_.getMessageList(); + } + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public int getClusterNodeCount() { + if (clusterNodeBuilder_ == null) { + return clusterNode_.size(); + } else { + return clusterNodeBuilder_.getCount(); + } + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceState getClusterNode(int index) { + if (clusterNodeBuilder_ == null) { + return clusterNode_.get(index); + } else { + return clusterNodeBuilder_.getMessage(index); + } + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder setClusterNode( + int index, org.apache.slider.api.proto.Messages.RoleInstanceState value) { + if (clusterNodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClusterNodeIsMutable(); + clusterNode_.set(index, value); + onChanged(); + } else { + clusterNodeBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder setClusterNode( + int index, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder builderForValue) { + if (clusterNodeBuilder_ == null) { + ensureClusterNodeIsMutable(); + clusterNode_.set(index, builderForValue.build()); + onChanged(); + } else { + clusterNodeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder addClusterNode(org.apache.slider.api.proto.Messages.RoleInstanceState value) { + if (clusterNodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClusterNodeIsMutable(); + clusterNode_.add(value); + onChanged(); + } else { + clusterNodeBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder addClusterNode( + int index, org.apache.slider.api.proto.Messages.RoleInstanceState value) { + if (clusterNodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClusterNodeIsMutable(); + clusterNode_.add(index, value); + onChanged(); + } else { + clusterNodeBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder addClusterNode( + org.apache.slider.api.proto.Messages.RoleInstanceState.Builder builderForValue) { + if (clusterNodeBuilder_ == null) { + ensureClusterNodeIsMutable(); + clusterNode_.add(builderForValue.build()); + onChanged(); + } else { + clusterNodeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder addClusterNode( + int index, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder builderForValue) { + if (clusterNodeBuilder_ == null) { + ensureClusterNodeIsMutable(); + clusterNode_.add(index, builderForValue.build()); + onChanged(); + } else { + clusterNodeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder addAllClusterNode( + java.lang.Iterable values) { + if (clusterNodeBuilder_ == null) { + ensureClusterNodeIsMutable(); + super.addAll(values, clusterNode_); + onChanged(); + } else { + clusterNodeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder clearClusterNode() { + if (clusterNodeBuilder_ == null) { + clusterNode_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + clusterNodeBuilder_.clear(); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public Builder removeClusterNode(int index) { + if (clusterNodeBuilder_ == null) { + ensureClusterNodeIsMutable(); + clusterNode_.remove(index); + onChanged(); + } else { + clusterNodeBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceState.Builder getClusterNodeBuilder( + int index) { + return getClusterNodeFieldBuilder().getBuilder(index); + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder getClusterNodeOrBuilder( + int index) { + if (clusterNodeBuilder_ == null) { + return clusterNode_.get(index); } else { + return clusterNodeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public java.util.List + getClusterNodeOrBuilderList() { + if (clusterNodeBuilder_ != null) { + return clusterNodeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(clusterNode_); + } + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceState.Builder addClusterNodeBuilder() { + return getClusterNodeFieldBuilder().addBuilder( + org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public org.apache.slider.api.proto.Messages.RoleInstanceState.Builder addClusterNodeBuilder( + int index) { + return getClusterNodeFieldBuilder().addBuilder( + index, org.apache.slider.api.proto.Messages.RoleInstanceState.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.RoleInstanceState clusterNode = 1; + */ + public java.util.List + getClusterNodeBuilderList() { + return getClusterNodeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.RoleInstanceState, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder, org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder> + getClusterNodeFieldBuilder() { + if (clusterNodeBuilder_ == null) { + clusterNodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.RoleInstanceState, org.apache.slider.api.proto.Messages.RoleInstanceState.Builder, org.apache.slider.api.proto.Messages.RoleInstanceStateOrBuilder>( + clusterNode_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + clusterNode_ = null; + } + return clusterNodeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetClusterNodesResponseProto) + } + + static { + defaultInstance = new GetClusterNodesResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetClusterNodesResponseProto) + } + + public interface EchoRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string text = 1; + /** + * required string text = 1; + */ + boolean hasText(); + /** + * required string text = 1; + */ + java.lang.String getText(); + /** + * required string text = 1; + */ + com.google.protobuf.ByteString + getTextBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.EchoRequestProto} + * + *
+   **
+   * Echo
+   * 
+ */ + public static final class EchoRequestProto extends + com.google.protobuf.GeneratedMessage + implements EchoRequestProtoOrBuilder { + // Use EchoRequestProto.newBuilder() to construct. + private EchoRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private EchoRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final EchoRequestProto defaultInstance; + public static EchoRequestProto getDefaultInstance() { + return defaultInstance; + } + + public EchoRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EchoRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + text_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.EchoRequestProto.class, org.apache.slider.api.proto.Messages.EchoRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public EchoRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EchoRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string text = 1; + public static final int TEXT_FIELD_NUMBER = 1; + private java.lang.Object text_; + /** + * required string text = 1; + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + text_ = s; + } + return s; + } + } + /** + * required string text = 1; + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + text_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasText()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTextBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTextBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.EchoRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.EchoRequestProto other = (org.apache.slider.api.proto.Messages.EchoRequestProto) obj; + + boolean result = true; + result = result && (hasText() == other.hasText()); + if (hasText()) { + result = result && getText() + .equals(other.getText()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.EchoRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.EchoRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.EchoRequestProto} + * + *
+     **
+     * Echo
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.EchoRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.EchoRequestProto.class, org.apache.slider.api.proto.Messages.EchoRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.EchoRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + text_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.EchoRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.EchoRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.EchoRequestProto build() { + org.apache.slider.api.proto.Messages.EchoRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.EchoRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.EchoRequestProto result = new org.apache.slider.api.proto.Messages.EchoRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.text_ = text_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.EchoRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.EchoRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.EchoRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.EchoRequestProto.getDefaultInstance()) return this; + if (other.hasText()) { + bitField0_ |= 0x00000001; + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasText()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.EchoRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.EchoRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string text = 1; + private java.lang.Object text_ = ""; + /** + * required string text = 1; + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string text = 1; + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string text = 1; + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + text_ = value; + onChanged(); + return this; + } + /** + * required string text = 1; + */ + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000001); + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + * required string text = 1; + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + text_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.EchoRequestProto) + } + + static { + defaultInstance = new EchoRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.EchoRequestProto) + } + + public interface EchoResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string text = 1; + /** + * required string text = 1; + */ + boolean hasText(); + /** + * required string text = 1; + */ + java.lang.String getText(); + /** + * required string text = 1; + */ + com.google.protobuf.ByteString + getTextBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.EchoResponseProto} + * + *
+   **
+   * Echo reply
+   * 
+ */ + public static final class EchoResponseProto extends + com.google.protobuf.GeneratedMessage + implements EchoResponseProtoOrBuilder { + // Use EchoResponseProto.newBuilder() to construct. + private EchoResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private EchoResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final EchoResponseProto defaultInstance; + public static EchoResponseProto getDefaultInstance() { + return defaultInstance; + } + + public EchoResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EchoResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + text_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.EchoResponseProto.class, org.apache.slider.api.proto.Messages.EchoResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public EchoResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EchoResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string text = 1; + public static final int TEXT_FIELD_NUMBER = 1; + private java.lang.Object text_; + /** + * required string text = 1; + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + text_ = s; + } + return s; + } + } + /** + * required string text = 1; + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + text_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasText()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTextBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTextBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.EchoResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.EchoResponseProto other = (org.apache.slider.api.proto.Messages.EchoResponseProto) obj; + + boolean result = true; + result = result && (hasText() == other.hasText()); + if (hasText()) { + result = result && getText() + .equals(other.getText()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.EchoResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.EchoResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.EchoResponseProto} + * + *
+     **
+     * Echo reply
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.EchoResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.EchoResponseProto.class, org.apache.slider.api.proto.Messages.EchoResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.EchoResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + text_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EchoResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.EchoResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.EchoResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.EchoResponseProto build() { + org.apache.slider.api.proto.Messages.EchoResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.EchoResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.EchoResponseProto result = new org.apache.slider.api.proto.Messages.EchoResponseProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.text_ = text_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.EchoResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.EchoResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.EchoResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.EchoResponseProto.getDefaultInstance()) return this; + if (other.hasText()) { + bitField0_ |= 0x00000001; + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasText()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.EchoResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.EchoResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string text = 1; + private java.lang.Object text_ = ""; + /** + * required string text = 1; + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string text = 1; + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string text = 1; + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + text_ = value; + onChanged(); + return this; + } + /** + * required string text = 1; + */ + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000001); + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + * required string text = 1; + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + text_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.EchoResponseProto) + } + + static { + defaultInstance = new EchoResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.EchoResponseProto) + } + + public interface KillContainerRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string id = 1; + /** + * required string id = 1; + */ + boolean hasId(); + /** + * required string id = 1; + */ + java.lang.String getId(); + /** + * required string id = 1; + */ + com.google.protobuf.ByteString + getIdBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.KillContainerRequestProto} + * + *
+   **
+   * Kill a container
+   * 
+ */ + public static final class KillContainerRequestProto extends + com.google.protobuf.GeneratedMessage + implements KillContainerRequestProtoOrBuilder { + // Use KillContainerRequestProto.newBuilder() to construct. + private KillContainerRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private KillContainerRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final KillContainerRequestProto defaultInstance; + public static KillContainerRequestProto getDefaultInstance() { + return defaultInstance; + } + + public KillContainerRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KillContainerRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + id_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.KillContainerRequestProto.class, org.apache.slider.api.proto.Messages.KillContainerRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public KillContainerRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KillContainerRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string id = 1; + public static final int ID_FIELD_NUMBER = 1; + private java.lang.Object id_; + /** + * required string id = 1; + */ + public boolean hasId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string id = 1; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + id_ = s; + } + return s; + } + } + /** + * required string id = 1; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + id_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasId()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getIdBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getIdBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.KillContainerRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.KillContainerRequestProto other = (org.apache.slider.api.proto.Messages.KillContainerRequestProto) obj; + + boolean result = true; + result = result && (hasId() == other.hasId()); + if (hasId()) { + result = result && getId() + .equals(other.getId()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasId()) { + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.KillContainerRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.KillContainerRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.KillContainerRequestProto} + * + *
+     **
+     * Kill a container
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.KillContainerRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.KillContainerRequestProto.class, org.apache.slider.api.proto.Messages.KillContainerRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.KillContainerRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + id_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.KillContainerRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.KillContainerRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.KillContainerRequestProto build() { + org.apache.slider.api.proto.Messages.KillContainerRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.KillContainerRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.KillContainerRequestProto result = new org.apache.slider.api.proto.Messages.KillContainerRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.id_ = id_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.KillContainerRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.KillContainerRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.KillContainerRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.KillContainerRequestProto.getDefaultInstance()) return this; + if (other.hasId()) { + bitField0_ |= 0x00000001; + id_ = other.id_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasId()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.KillContainerRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.KillContainerRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string id = 1; + private java.lang.Object id_ = ""; + /** + * required string id = 1; + */ + public boolean hasId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string id = 1; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string id = 1; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string id = 1; + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + id_ = value; + onChanged(); + return this; + } + /** + * required string id = 1; + */ + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000001); + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * required string id = 1; + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + id_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.KillContainerRequestProto) + } + + static { + defaultInstance = new KillContainerRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.KillContainerRequestProto) + } + + public interface KillContainerResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required bool success = 1; + /** + * required bool success = 1; + */ + boolean hasSuccess(); + /** + * required bool success = 1; + */ + boolean getSuccess(); + } + /** + * Protobuf type {@code org.apache.slider.api.KillContainerResponseProto} + * + *
+   **
+   * Kill reply
+   * 
+ */ + public static final class KillContainerResponseProto extends + com.google.protobuf.GeneratedMessage + implements KillContainerResponseProtoOrBuilder { + // Use KillContainerResponseProto.newBuilder() to construct. + private KillContainerResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private KillContainerResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final KillContainerResponseProto defaultInstance; + public static KillContainerResponseProto getDefaultInstance() { + return defaultInstance; + } + + public KillContainerResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KillContainerResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + success_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.KillContainerResponseProto.class, org.apache.slider.api.proto.Messages.KillContainerResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public KillContainerResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KillContainerResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required bool success = 1; + public static final int SUCCESS_FIELD_NUMBER = 1; + private boolean success_; + /** + * required bool success = 1; + */ + public boolean hasSuccess() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required bool success = 1; + */ + public boolean getSuccess() { + return success_; + } + + private void initFields() { + success_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasSuccess()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, success_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, success_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.KillContainerResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.KillContainerResponseProto other = (org.apache.slider.api.proto.Messages.KillContainerResponseProto) obj; + + boolean result = true; + result = result && (hasSuccess() == other.hasSuccess()); + if (hasSuccess()) { + result = result && (getSuccess() + == other.getSuccess()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasSuccess()) { + hash = (37 * hash) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getSuccess()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.KillContainerResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.KillContainerResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.KillContainerResponseProto} + * + *
+     **
+     * Kill reply
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.KillContainerResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.KillContainerResponseProto.class, org.apache.slider.api.proto.Messages.KillContainerResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.KillContainerResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + success_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_KillContainerResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.KillContainerResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.KillContainerResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.KillContainerResponseProto build() { + org.apache.slider.api.proto.Messages.KillContainerResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.KillContainerResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.KillContainerResponseProto result = new org.apache.slider.api.proto.Messages.KillContainerResponseProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.success_ = success_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.KillContainerResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.KillContainerResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.KillContainerResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.KillContainerResponseProto.getDefaultInstance()) return this; + if (other.hasSuccess()) { + setSuccess(other.getSuccess()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasSuccess()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.KillContainerResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.KillContainerResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required bool success = 1; + private boolean success_ ; + /** + * required bool success = 1; + */ + public boolean hasSuccess() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required bool success = 1; + */ + public boolean getSuccess() { + return success_; + } + /** + * required bool success = 1; + */ + public Builder setSuccess(boolean value) { + bitField0_ |= 0x00000001; + success_ = value; + onChanged(); + return this; + } + /** + * required bool success = 1; + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000001); + success_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.KillContainerResponseProto) + } + + static { + defaultInstance = new KillContainerResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.KillContainerResponseProto) + } + + public interface AMSuicideRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string text = 1; + /** + * required string text = 1; + */ + boolean hasText(); + /** + * required string text = 1; + */ + java.lang.String getText(); + /** + * required string text = 1; + */ + com.google.protobuf.ByteString + getTextBytes(); + + // required int32 signal = 2; + /** + * required int32 signal = 2; + */ + boolean hasSignal(); + /** + * required int32 signal = 2; + */ + int getSignal(); + + // required int32 delay = 3; + /** + * required int32 delay = 3; + */ + boolean hasDelay(); + /** + * required int32 delay = 3; + */ + int getDelay(); + } + /** + * Protobuf type {@code org.apache.slider.api.AMSuicideRequestProto} + * + *
+   **
+   * AM suicide
+   * 
+ */ + public static final class AMSuicideRequestProto extends + com.google.protobuf.GeneratedMessage + implements AMSuicideRequestProtoOrBuilder { + // Use AMSuicideRequestProto.newBuilder() to construct. + private AMSuicideRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AMSuicideRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final AMSuicideRequestProto defaultInstance; + public static AMSuicideRequestProto getDefaultInstance() { + return defaultInstance; + } + + public AMSuicideRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AMSuicideRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + text_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + signal_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + delay_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.AMSuicideRequestProto.class, org.apache.slider.api.proto.Messages.AMSuicideRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AMSuicideRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AMSuicideRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string text = 1; + public static final int TEXT_FIELD_NUMBER = 1; + private java.lang.Object text_; + /** + * required string text = 1; + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + text_ = s; + } + return s; + } + } + /** + * required string text = 1; + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required int32 signal = 2; + public static final int SIGNAL_FIELD_NUMBER = 2; + private int signal_; + /** + * required int32 signal = 2; + */ + public boolean hasSignal() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int32 signal = 2; + */ + public int getSignal() { + return signal_; + } + + // required int32 delay = 3; + public static final int DELAY_FIELD_NUMBER = 3; + private int delay_; + /** + * required int32 delay = 3; + */ + public boolean hasDelay() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int32 delay = 3; + */ + public int getDelay() { + return delay_; + } + + private void initFields() { + text_ = ""; + signal_ = 0; + delay_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasText()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasSignal()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasDelay()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTextBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, signal_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, delay_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTextBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, signal_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, delay_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.AMSuicideRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.AMSuicideRequestProto other = (org.apache.slider.api.proto.Messages.AMSuicideRequestProto) obj; + + boolean result = true; + result = result && (hasText() == other.hasText()); + if (hasText()) { + result = result && getText() + .equals(other.getText()); + } + result = result && (hasSignal() == other.hasSignal()); + if (hasSignal()) { + result = result && (getSignal() + == other.getSignal()); + } + result = result && (hasDelay() == other.hasDelay()); + if (hasDelay()) { + result = result && (getDelay() + == other.getDelay()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + if (hasSignal()) { + hash = (37 * hash) + SIGNAL_FIELD_NUMBER; + hash = (53 * hash) + getSignal(); + } + if (hasDelay()) { + hash = (37 * hash) + DELAY_FIELD_NUMBER; + hash = (53 * hash) + getDelay(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.AMSuicideRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.AMSuicideRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.AMSuicideRequestProto} + * + *
+     **
+     * AM suicide
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.AMSuicideRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.AMSuicideRequestProto.class, org.apache.slider.api.proto.Messages.AMSuicideRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.AMSuicideRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + text_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + signal_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + delay_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.AMSuicideRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.AMSuicideRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.AMSuicideRequestProto build() { + org.apache.slider.api.proto.Messages.AMSuicideRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.AMSuicideRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.AMSuicideRequestProto result = new org.apache.slider.api.proto.Messages.AMSuicideRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.text_ = text_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.signal_ = signal_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.delay_ = delay_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.AMSuicideRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.AMSuicideRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.AMSuicideRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.AMSuicideRequestProto.getDefaultInstance()) return this; + if (other.hasText()) { + bitField0_ |= 0x00000001; + text_ = other.text_; + onChanged(); + } + if (other.hasSignal()) { + setSignal(other.getSignal()); + } + if (other.hasDelay()) { + setDelay(other.getDelay()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasText()) { + + return false; + } + if (!hasSignal()) { + + return false; + } + if (!hasDelay()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.AMSuicideRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.AMSuicideRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string text = 1; + private java.lang.Object text_ = ""; + /** + * required string text = 1; + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string text = 1; + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string text = 1; + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + text_ = value; + onChanged(); + return this; + } + /** + * required string text = 1; + */ + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000001); + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + * required string text = 1; + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + text_ = value; + onChanged(); + return this; + } + + // required int32 signal = 2; + private int signal_ ; + /** + * required int32 signal = 2; + */ + public boolean hasSignal() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int32 signal = 2; + */ + public int getSignal() { + return signal_; + } + /** + * required int32 signal = 2; + */ + public Builder setSignal(int value) { + bitField0_ |= 0x00000002; + signal_ = value; + onChanged(); + return this; + } + /** + * required int32 signal = 2; + */ + public Builder clearSignal() { + bitField0_ = (bitField0_ & ~0x00000002); + signal_ = 0; + onChanged(); + return this; + } + + // required int32 delay = 3; + private int delay_ ; + /** + * required int32 delay = 3; + */ + public boolean hasDelay() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int32 delay = 3; + */ + public int getDelay() { + return delay_; + } + /** + * required int32 delay = 3; + */ + public Builder setDelay(int value) { + bitField0_ |= 0x00000004; + delay_ = value; + onChanged(); + return this; + } + /** + * required int32 delay = 3; + */ + public Builder clearDelay() { + bitField0_ = (bitField0_ & ~0x00000004); + delay_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.AMSuicideRequestProto) + } + + static { + defaultInstance = new AMSuicideRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.AMSuicideRequestProto) + } + + public interface AMSuicideResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.AMSuicideResponseProto} + * + *
+   **
+   * AM suicide reply. For this to be returned implies
+   * a failure of the AM to kill itself
+   * 
+ */ + public static final class AMSuicideResponseProto extends + com.google.protobuf.GeneratedMessage + implements AMSuicideResponseProtoOrBuilder { + // Use AMSuicideResponseProto.newBuilder() to construct. + private AMSuicideResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AMSuicideResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final AMSuicideResponseProto defaultInstance; + public static AMSuicideResponseProto getDefaultInstance() { + return defaultInstance; + } + + public AMSuicideResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AMSuicideResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.AMSuicideResponseProto.class, org.apache.slider.api.proto.Messages.AMSuicideResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AMSuicideResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AMSuicideResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.AMSuicideResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.AMSuicideResponseProto other = (org.apache.slider.api.proto.Messages.AMSuicideResponseProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.AMSuicideResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.AMSuicideResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.AMSuicideResponseProto} + * + *
+     **
+     * AM suicide reply. For this to be returned implies
+     * a failure of the AM to kill itself
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.AMSuicideResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.AMSuicideResponseProto.class, org.apache.slider.api.proto.Messages.AMSuicideResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.AMSuicideResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_AMSuicideResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.AMSuicideResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.AMSuicideResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.AMSuicideResponseProto build() { + org.apache.slider.api.proto.Messages.AMSuicideResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.AMSuicideResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.AMSuicideResponseProto result = new org.apache.slider.api.proto.Messages.AMSuicideResponseProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.AMSuicideResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.AMSuicideResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.AMSuicideResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.AMSuicideResponseProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.AMSuicideResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.AMSuicideResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.AMSuicideResponseProto) + } + + static { + defaultInstance = new AMSuicideResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.AMSuicideResponseProto) + } + + public interface GetInstanceDefinitionRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetInstanceDefinitionRequestProto} + * + *
+   **
+   * Ask for the instance definition details
+   * 
+ */ + public static final class GetInstanceDefinitionRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetInstanceDefinitionRequestProtoOrBuilder { + // Use GetInstanceDefinitionRequestProto.newBuilder() to construct. + private GetInstanceDefinitionRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetInstanceDefinitionRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetInstanceDefinitionRequestProto defaultInstance; + public static GetInstanceDefinitionRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetInstanceDefinitionRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetInstanceDefinitionRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.class, org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetInstanceDefinitionRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceDefinitionRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto other = (org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetInstanceDefinitionRequestProto} + * + *
+     **
+     * Ask for the instance definition details
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.class, org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto build() { + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto result = new org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetInstanceDefinitionRequestProto) + } + + static { + defaultInstance = new GetInstanceDefinitionRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetInstanceDefinitionRequestProto) + } + + public interface GetInstanceDefinitionResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string internal = 1; + /** + * required string internal = 1; + */ + boolean hasInternal(); + /** + * required string internal = 1; + */ + java.lang.String getInternal(); + /** + * required string internal = 1; + */ + com.google.protobuf.ByteString + getInternalBytes(); + + // required string resources = 2; + /** + * required string resources = 2; + */ + boolean hasResources(); + /** + * required string resources = 2; + */ + java.lang.String getResources(); + /** + * required string resources = 2; + */ + com.google.protobuf.ByteString + getResourcesBytes(); + + // required string application = 3; + /** + * required string application = 3; + */ + boolean hasApplication(); + /** + * required string application = 3; + */ + java.lang.String getApplication(); + /** + * required string application = 3; + */ + com.google.protobuf.ByteString + getApplicationBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetInstanceDefinitionResponseProto} + * + *
+   **
+   * Get the definition back as three separate JSON strings
+   * 
+ */ + public static final class GetInstanceDefinitionResponseProto extends + com.google.protobuf.GeneratedMessage + implements GetInstanceDefinitionResponseProtoOrBuilder { + // Use GetInstanceDefinitionResponseProto.newBuilder() to construct. + private GetInstanceDefinitionResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetInstanceDefinitionResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetInstanceDefinitionResponseProto defaultInstance; + public static GetInstanceDefinitionResponseProto getDefaultInstance() { + return defaultInstance; + } + + public GetInstanceDefinitionResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetInstanceDefinitionResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + internal_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + resources_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + application_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.class, org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetInstanceDefinitionResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceDefinitionResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string internal = 1; + public static final int INTERNAL_FIELD_NUMBER = 1; + private java.lang.Object internal_; + /** + * required string internal = 1; + */ + public boolean hasInternal() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string internal = 1; + */ + public java.lang.String getInternal() { + java.lang.Object ref = internal_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + internal_ = s; + } + return s; + } + } + /** + * required string internal = 1; + */ + public com.google.protobuf.ByteString + getInternalBytes() { + java.lang.Object ref = internal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + internal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string resources = 2; + public static final int RESOURCES_FIELD_NUMBER = 2; + private java.lang.Object resources_; + /** + * required string resources = 2; + */ + public boolean hasResources() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string resources = 2; + */ + public java.lang.String getResources() { + java.lang.Object ref = resources_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + resources_ = s; + } + return s; + } + } + /** + * required string resources = 2; + */ + public com.google.protobuf.ByteString + getResourcesBytes() { + java.lang.Object ref = resources_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resources_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string application = 3; + public static final int APPLICATION_FIELD_NUMBER = 3; + private java.lang.Object application_; + /** + * required string application = 3; + */ + public boolean hasApplication() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required string application = 3; + */ + public java.lang.String getApplication() { + java.lang.Object ref = application_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + application_ = s; + } + return s; + } + } + /** + * required string application = 3; + */ + public com.google.protobuf.ByteString + getApplicationBytes() { + java.lang.Object ref = application_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + application_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + internal_ = ""; + resources_ = ""; + application_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasInternal()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasResources()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasApplication()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getInternalBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getResourcesBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getApplicationBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getInternalBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getResourcesBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getApplicationBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto other = (org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto) obj; + + boolean result = true; + result = result && (hasInternal() == other.hasInternal()); + if (hasInternal()) { + result = result && getInternal() + .equals(other.getInternal()); + } + result = result && (hasResources() == other.hasResources()); + if (hasResources()) { + result = result && getResources() + .equals(other.getResources()); + } + result = result && (hasApplication() == other.hasApplication()); + if (hasApplication()) { + result = result && getApplication() + .equals(other.getApplication()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasInternal()) { + hash = (37 * hash) + INTERNAL_FIELD_NUMBER; + hash = (53 * hash) + getInternal().hashCode(); + } + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } + if (hasApplication()) { + hash = (37 * hash) + APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getApplication().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetInstanceDefinitionResponseProto} + * + *
+     **
+     * Get the definition back as three separate JSON strings
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.class, org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + internal_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + resources_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + application_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto build() { + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto result = new org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.internal_ = internal_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.resources_ = resources_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.application_ = application_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.getDefaultInstance()) return this; + if (other.hasInternal()) { + bitField0_ |= 0x00000001; + internal_ = other.internal_; + onChanged(); + } + if (other.hasResources()) { + bitField0_ |= 0x00000002; + resources_ = other.resources_; + onChanged(); + } + if (other.hasApplication()) { + bitField0_ |= 0x00000004; + application_ = other.application_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasInternal()) { + + return false; + } + if (!hasResources()) { + + return false; + } + if (!hasApplication()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string internal = 1; + private java.lang.Object internal_ = ""; + /** + * required string internal = 1; + */ + public boolean hasInternal() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string internal = 1; + */ + public java.lang.String getInternal() { + java.lang.Object ref = internal_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + internal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string internal = 1; + */ + public com.google.protobuf.ByteString + getInternalBytes() { + java.lang.Object ref = internal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + internal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string internal = 1; + */ + public Builder setInternal( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + internal_ = value; + onChanged(); + return this; + } + /** + * required string internal = 1; + */ + public Builder clearInternal() { + bitField0_ = (bitField0_ & ~0x00000001); + internal_ = getDefaultInstance().getInternal(); + onChanged(); + return this; + } + /** + * required string internal = 1; + */ + public Builder setInternalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + internal_ = value; + onChanged(); + return this; + } + + // required string resources = 2; + private java.lang.Object resources_ = ""; + /** + * required string resources = 2; + */ + public boolean hasResources() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string resources = 2; + */ + public java.lang.String getResources() { + java.lang.Object ref = resources_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + resources_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string resources = 2; + */ + public com.google.protobuf.ByteString + getResourcesBytes() { + java.lang.Object ref = resources_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resources_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string resources = 2; + */ + public Builder setResources( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + resources_ = value; + onChanged(); + return this; + } + /** + * required string resources = 2; + */ + public Builder clearResources() { + bitField0_ = (bitField0_ & ~0x00000002); + resources_ = getDefaultInstance().getResources(); + onChanged(); + return this; + } + /** + * required string resources = 2; + */ + public Builder setResourcesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + resources_ = value; + onChanged(); + return this; + } + + // required string application = 3; + private java.lang.Object application_ = ""; + /** + * required string application = 3; + */ + public boolean hasApplication() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required string application = 3; + */ + public java.lang.String getApplication() { + java.lang.Object ref = application_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + application_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string application = 3; + */ + public com.google.protobuf.ByteString + getApplicationBytes() { + java.lang.Object ref = application_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + application_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string application = 3; + */ + public Builder setApplication( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + application_ = value; + onChanged(); + return this; + } + /** + * required string application = 3; + */ + public Builder clearApplication() { + bitField0_ = (bitField0_ & ~0x00000004); + application_ = getDefaultInstance().getApplication(); + onChanged(); + return this; + } + /** + * required string application = 3; + */ + public Builder setApplicationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + application_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetInstanceDefinitionResponseProto) + } + + static { + defaultInstance = new GetInstanceDefinitionResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetInstanceDefinitionResponseProto) + } + + public interface ApplicationLivenessInformationProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bool allRequestsSatisfied = 1; + /** + * optional bool allRequestsSatisfied = 1; + */ + boolean hasAllRequestsSatisfied(); + /** + * optional bool allRequestsSatisfied = 1; + */ + boolean getAllRequestsSatisfied(); + + // optional int32 requestsOutstanding = 2; + /** + * optional int32 requestsOutstanding = 2; + */ + boolean hasRequestsOutstanding(); + /** + * optional int32 requestsOutstanding = 2; + */ + int getRequestsOutstanding(); + } + /** + * Protobuf type {@code org.apache.slider.api.ApplicationLivenessInformationProto} + * + *
+   **
+   * See org.apache.slider.api.types.ApplicationLivenessInformation
+   * 
+ */ + public static final class ApplicationLivenessInformationProto extends + com.google.protobuf.GeneratedMessage + implements ApplicationLivenessInformationProtoOrBuilder { + // Use ApplicationLivenessInformationProto.newBuilder() to construct. + private ApplicationLivenessInformationProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ApplicationLivenessInformationProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ApplicationLivenessInformationProto defaultInstance; + public static ApplicationLivenessInformationProto getDefaultInstance() { + return defaultInstance; + } + + public ApplicationLivenessInformationProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ApplicationLivenessInformationProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + allRequestsSatisfied_ = input.readBool(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + requestsOutstanding_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.class, org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ApplicationLivenessInformationProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ApplicationLivenessInformationProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional bool allRequestsSatisfied = 1; + public static final int ALLREQUESTSSATISFIED_FIELD_NUMBER = 1; + private boolean allRequestsSatisfied_; + /** + * optional bool allRequestsSatisfied = 1; + */ + public boolean hasAllRequestsSatisfied() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool allRequestsSatisfied = 1; + */ + public boolean getAllRequestsSatisfied() { + return allRequestsSatisfied_; + } + + // optional int32 requestsOutstanding = 2; + public static final int REQUESTSOUTSTANDING_FIELD_NUMBER = 2; + private int requestsOutstanding_; + /** + * optional int32 requestsOutstanding = 2; + */ + public boolean hasRequestsOutstanding() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 requestsOutstanding = 2; + */ + public int getRequestsOutstanding() { + return requestsOutstanding_; + } + + private void initFields() { + allRequestsSatisfied_ = false; + requestsOutstanding_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, allRequestsSatisfied_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, requestsOutstanding_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, allRequestsSatisfied_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, requestsOutstanding_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto other = (org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto) obj; + + boolean result = true; + result = result && (hasAllRequestsSatisfied() == other.hasAllRequestsSatisfied()); + if (hasAllRequestsSatisfied()) { + result = result && (getAllRequestsSatisfied() + == other.getAllRequestsSatisfied()); + } + result = result && (hasRequestsOutstanding() == other.hasRequestsOutstanding()); + if (hasRequestsOutstanding()) { + result = result && (getRequestsOutstanding() + == other.getRequestsOutstanding()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasAllRequestsSatisfied()) { + hash = (37 * hash) + ALLREQUESTSSATISFIED_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getAllRequestsSatisfied()); + } + if (hasRequestsOutstanding()) { + hash = (37 * hash) + REQUESTSOUTSTANDING_FIELD_NUMBER; + hash = (53 * hash) + getRequestsOutstanding(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.ApplicationLivenessInformationProto} + * + *
+     **
+     * See org.apache.slider.api.types.ApplicationLivenessInformation
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.class, org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + allRequestsSatisfied_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + requestsOutstanding_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto build() { + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto buildPartial() { + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto result = new org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.allRequestsSatisfied_ = allRequestsSatisfied_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.requestsOutstanding_ = requestsOutstanding_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto other) { + if (other == org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.getDefaultInstance()) return this; + if (other.hasAllRequestsSatisfied()) { + setAllRequestsSatisfied(other.getAllRequestsSatisfied()); + } + if (other.hasRequestsOutstanding()) { + setRequestsOutstanding(other.getRequestsOutstanding()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional bool allRequestsSatisfied = 1; + private boolean allRequestsSatisfied_ ; + /** + * optional bool allRequestsSatisfied = 1; + */ + public boolean hasAllRequestsSatisfied() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional bool allRequestsSatisfied = 1; + */ + public boolean getAllRequestsSatisfied() { + return allRequestsSatisfied_; + } + /** + * optional bool allRequestsSatisfied = 1; + */ + public Builder setAllRequestsSatisfied(boolean value) { + bitField0_ |= 0x00000001; + allRequestsSatisfied_ = value; + onChanged(); + return this; + } + /** + * optional bool allRequestsSatisfied = 1; + */ + public Builder clearAllRequestsSatisfied() { + bitField0_ = (bitField0_ & ~0x00000001); + allRequestsSatisfied_ = false; + onChanged(); + return this; + } + + // optional int32 requestsOutstanding = 2; + private int requestsOutstanding_ ; + /** + * optional int32 requestsOutstanding = 2; + */ + public boolean hasRequestsOutstanding() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 requestsOutstanding = 2; + */ + public int getRequestsOutstanding() { + return requestsOutstanding_; + } + /** + * optional int32 requestsOutstanding = 2; + */ + public Builder setRequestsOutstanding(int value) { + bitField0_ |= 0x00000002; + requestsOutstanding_ = value; + onChanged(); + return this; + } + /** + * optional int32 requestsOutstanding = 2; + */ + public Builder clearRequestsOutstanding() { + bitField0_ = (bitField0_ & ~0x00000002); + requestsOutstanding_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.ApplicationLivenessInformationProto) + } + + static { + defaultInstance = new ApplicationLivenessInformationProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.ApplicationLivenessInformationProto) + } + + public interface ComponentInformationProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + /** + * optional string name = 1; + */ + boolean hasName(); + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + // optional int32 priority = 2; + /** + * optional int32 priority = 2; + */ + boolean hasPriority(); + /** + * optional int32 priority = 2; + */ + int getPriority(); + + // optional int32 desired = 3; + /** + * optional int32 desired = 3; + */ + boolean hasDesired(); + /** + * optional int32 desired = 3; + */ + int getDesired(); + + // optional int32 actual = 4; + /** + * optional int32 actual = 4; + */ + boolean hasActual(); + /** + * optional int32 actual = 4; + */ + int getActual(); + + // optional int32 releasing = 5; + /** + * optional int32 releasing = 5; + */ + boolean hasReleasing(); + /** + * optional int32 releasing = 5; + */ + int getReleasing(); + + // optional int32 requested = 6; + /** + * optional int32 requested = 6; + */ + boolean hasRequested(); + /** + * optional int32 requested = 6; + */ + int getRequested(); + + // optional int32 failed = 7; + /** + * optional int32 failed = 7; + */ + boolean hasFailed(); + /** + * optional int32 failed = 7; + */ + int getFailed(); + + // optional int32 started = 8; + /** + * optional int32 started = 8; + */ + boolean hasStarted(); + /** + * optional int32 started = 8; + */ + int getStarted(); + + // optional int32 startFailed = 9; + /** + * optional int32 startFailed = 9; + */ + boolean hasStartFailed(); + /** + * optional int32 startFailed = 9; + */ + int getStartFailed(); + + // optional int32 completed = 10; + /** + * optional int32 completed = 10; + */ + boolean hasCompleted(); + /** + * optional int32 completed = 10; + */ + int getCompleted(); + + // optional int32 totalRequested = 11; + /** + * optional int32 totalRequested = 11; + */ + boolean hasTotalRequested(); + /** + * optional int32 totalRequested = 11; + */ + int getTotalRequested(); + + // optional string failureMessage = 12; + /** + * optional string failureMessage = 12; + */ + boolean hasFailureMessage(); + /** + * optional string failureMessage = 12; + */ + java.lang.String getFailureMessage(); + /** + * optional string failureMessage = 12; + */ + com.google.protobuf.ByteString + getFailureMessageBytes(); + + // optional int32 placementPolicy = 13; + /** + * optional int32 placementPolicy = 13; + */ + boolean hasPlacementPolicy(); + /** + * optional int32 placementPolicy = 13; + */ + int getPlacementPolicy(); + + // repeated string containers = 14; + /** + * repeated string containers = 14; + */ + java.util.List + getContainersList(); + /** + * repeated string containers = 14; + */ + int getContainersCount(); + /** + * repeated string containers = 14; + */ + java.lang.String getContainers(int index); + /** + * repeated string containers = 14; + */ + com.google.protobuf.ByteString + getContainersBytes(int index); + + // optional int32 failedRecently = 15; + /** + * optional int32 failedRecently = 15; + */ + boolean hasFailedRecently(); + /** + * optional int32 failedRecently = 15; + */ + int getFailedRecently(); + + // optional int32 nodeFailed = 16; + /** + * optional int32 nodeFailed = 16; + */ + boolean hasNodeFailed(); + /** + * optional int32 nodeFailed = 16; + */ + int getNodeFailed(); + + // optional int32 preempted = 17; + /** + * optional int32 preempted = 17; + */ + boolean hasPreempted(); + /** + * optional int32 preempted = 17; + */ + int getPreempted(); + + // optional int32 pendingAntiAffineRequestCount = 18; + /** + * optional int32 pendingAntiAffineRequestCount = 18; + */ + boolean hasPendingAntiAffineRequestCount(); + /** + * optional int32 pendingAntiAffineRequestCount = 18; + */ + int getPendingAntiAffineRequestCount(); + + // optional bool isAARequestOutstanding = 19; + /** + * optional bool isAARequestOutstanding = 19; + */ + boolean hasIsAARequestOutstanding(); + /** + * optional bool isAARequestOutstanding = 19; + */ + boolean getIsAARequestOutstanding(); + } + /** + * Protobuf type {@code org.apache.slider.api.ComponentInformationProto} + * + *
+   *
+   * see org.apache.slider.api.types.ComponentInformation
+   * 
+ */ + public static final class ComponentInformationProto extends + com.google.protobuf.GeneratedMessage + implements ComponentInformationProtoOrBuilder { + // Use ComponentInformationProto.newBuilder() to construct. + private ComponentInformationProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ComponentInformationProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ComponentInformationProto defaultInstance; + public static ComponentInformationProto getDefaultInstance() { + return defaultInstance; + } + + public ComponentInformationProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ComponentInformationProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + priority_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + desired_ = input.readInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + actual_ = input.readInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + releasing_ = input.readInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + requested_ = input.readInt32(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + failed_ = input.readInt32(); + break; + } + case 64: { + bitField0_ |= 0x00000080; + started_ = input.readInt32(); + break; + } + case 72: { + bitField0_ |= 0x00000100; + startFailed_ = input.readInt32(); + break; + } + case 80: { + bitField0_ |= 0x00000200; + completed_ = input.readInt32(); + break; + } + case 88: { + bitField0_ |= 0x00000400; + totalRequested_ = input.readInt32(); + break; + } + case 98: { + bitField0_ |= 0x00000800; + failureMessage_ = input.readBytes(); + break; + } + case 104: { + bitField0_ |= 0x00001000; + placementPolicy_ = input.readInt32(); + break; + } + case 114: { + if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) { + containers_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00002000; + } + containers_.add(input.readBytes()); + break; + } + case 120: { + bitField0_ |= 0x00002000; + failedRecently_ = input.readInt32(); + break; + } + case 128: { + bitField0_ |= 0x00004000; + nodeFailed_ = input.readInt32(); + break; + } + case 136: { + bitField0_ |= 0x00008000; + preempted_ = input.readInt32(); + break; + } + case 144: { + bitField0_ |= 0x00010000; + pendingAntiAffineRequestCount_ = input.readInt32(); + break; + } + case 152: { + bitField0_ |= 0x00020000; + isAARequestOutstanding_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) { + containers_ = new com.google.protobuf.UnmodifiableLazyStringList(containers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ComponentInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ComponentInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ComponentInformationProto.class, org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ComponentInformationProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ComponentInformationProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int32 priority = 2; + public static final int PRIORITY_FIELD_NUMBER = 2; + private int priority_; + /** + * optional int32 priority = 2; + */ + public boolean hasPriority() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 priority = 2; + */ + public int getPriority() { + return priority_; + } + + // optional int32 desired = 3; + public static final int DESIRED_FIELD_NUMBER = 3; + private int desired_; + /** + * optional int32 desired = 3; + */ + public boolean hasDesired() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 desired = 3; + */ + public int getDesired() { + return desired_; + } + + // optional int32 actual = 4; + public static final int ACTUAL_FIELD_NUMBER = 4; + private int actual_; + /** + * optional int32 actual = 4; + */ + public boolean hasActual() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 actual = 4; + */ + public int getActual() { + return actual_; + } + + // optional int32 releasing = 5; + public static final int RELEASING_FIELD_NUMBER = 5; + private int releasing_; + /** + * optional int32 releasing = 5; + */ + public boolean hasReleasing() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 releasing = 5; + */ + public int getReleasing() { + return releasing_; + } + + // optional int32 requested = 6; + public static final int REQUESTED_FIELD_NUMBER = 6; + private int requested_; + /** + * optional int32 requested = 6; + */ + public boolean hasRequested() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 requested = 6; + */ + public int getRequested() { + return requested_; + } + + // optional int32 failed = 7; + public static final int FAILED_FIELD_NUMBER = 7; + private int failed_; + /** + * optional int32 failed = 7; + */ + public boolean hasFailed() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int32 failed = 7; + */ + public int getFailed() { + return failed_; + } + + // optional int32 started = 8; + public static final int STARTED_FIELD_NUMBER = 8; + private int started_; + /** + * optional int32 started = 8; + */ + public boolean hasStarted() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional int32 started = 8; + */ + public int getStarted() { + return started_; + } + + // optional int32 startFailed = 9; + public static final int STARTFAILED_FIELD_NUMBER = 9; + private int startFailed_; + /** + * optional int32 startFailed = 9; + */ + public boolean hasStartFailed() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional int32 startFailed = 9; + */ + public int getStartFailed() { + return startFailed_; + } + + // optional int32 completed = 10; + public static final int COMPLETED_FIELD_NUMBER = 10; + private int completed_; + /** + * optional int32 completed = 10; + */ + public boolean hasCompleted() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional int32 completed = 10; + */ + public int getCompleted() { + return completed_; + } + + // optional int32 totalRequested = 11; + public static final int TOTALREQUESTED_FIELD_NUMBER = 11; + private int totalRequested_; + /** + * optional int32 totalRequested = 11; + */ + public boolean hasTotalRequested() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional int32 totalRequested = 11; + */ + public int getTotalRequested() { + return totalRequested_; + } + + // optional string failureMessage = 12; + public static final int FAILUREMESSAGE_FIELD_NUMBER = 12; + private java.lang.Object failureMessage_; + /** + * optional string failureMessage = 12; + */ + public boolean hasFailureMessage() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string failureMessage = 12; + */ + public java.lang.String getFailureMessage() { + java.lang.Object ref = failureMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + failureMessage_ = s; + } + return s; + } + } + /** + * optional string failureMessage = 12; + */ + public com.google.protobuf.ByteString + getFailureMessageBytes() { + java.lang.Object ref = failureMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + failureMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int32 placementPolicy = 13; + public static final int PLACEMENTPOLICY_FIELD_NUMBER = 13; + private int placementPolicy_; + /** + * optional int32 placementPolicy = 13; + */ + public boolean hasPlacementPolicy() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional int32 placementPolicy = 13; + */ + public int getPlacementPolicy() { + return placementPolicy_; + } + + // repeated string containers = 14; + public static final int CONTAINERS_FIELD_NUMBER = 14; + private com.google.protobuf.LazyStringList containers_; + /** + * repeated string containers = 14; + */ + public java.util.List + getContainersList() { + return containers_; + } + /** + * repeated string containers = 14; + */ + public int getContainersCount() { + return containers_.size(); + } + /** + * repeated string containers = 14; + */ + public java.lang.String getContainers(int index) { + return containers_.get(index); + } + /** + * repeated string containers = 14; + */ + public com.google.protobuf.ByteString + getContainersBytes(int index) { + return containers_.getByteString(index); + } + + // optional int32 failedRecently = 15; + public static final int FAILEDRECENTLY_FIELD_NUMBER = 15; + private int failedRecently_; + /** + * optional int32 failedRecently = 15; + */ + public boolean hasFailedRecently() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional int32 failedRecently = 15; + */ + public int getFailedRecently() { + return failedRecently_; + } + + // optional int32 nodeFailed = 16; + public static final int NODEFAILED_FIELD_NUMBER = 16; + private int nodeFailed_; + /** + * optional int32 nodeFailed = 16; + */ + public boolean hasNodeFailed() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional int32 nodeFailed = 16; + */ + public int getNodeFailed() { + return nodeFailed_; + } + + // optional int32 preempted = 17; + public static final int PREEMPTED_FIELD_NUMBER = 17; + private int preempted_; + /** + * optional int32 preempted = 17; + */ + public boolean hasPreempted() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional int32 preempted = 17; + */ + public int getPreempted() { + return preempted_; + } + + // optional int32 pendingAntiAffineRequestCount = 18; + public static final int PENDINGANTIAFFINEREQUESTCOUNT_FIELD_NUMBER = 18; + private int pendingAntiAffineRequestCount_; + /** + * optional int32 pendingAntiAffineRequestCount = 18; + */ + public boolean hasPendingAntiAffineRequestCount() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional int32 pendingAntiAffineRequestCount = 18; + */ + public int getPendingAntiAffineRequestCount() { + return pendingAntiAffineRequestCount_; + } + + // optional bool isAARequestOutstanding = 19; + public static final int ISAAREQUESTOUTSTANDING_FIELD_NUMBER = 19; + private boolean isAARequestOutstanding_; + /** + * optional bool isAARequestOutstanding = 19; + */ + public boolean hasIsAARequestOutstanding() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional bool isAARequestOutstanding = 19; + */ + public boolean getIsAARequestOutstanding() { + return isAARequestOutstanding_; + } + + private void initFields() { + name_ = ""; + priority_ = 0; + desired_ = 0; + actual_ = 0; + releasing_ = 0; + requested_ = 0; + failed_ = 0; + started_ = 0; + startFailed_ = 0; + completed_ = 0; + totalRequested_ = 0; + failureMessage_ = ""; + placementPolicy_ = 0; + containers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + failedRecently_ = 0; + nodeFailed_ = 0; + preempted_ = 0; + pendingAntiAffineRequestCount_ = 0; + isAARequestOutstanding_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, priority_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, desired_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(4, actual_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, releasing_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(6, requested_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeInt32(7, failed_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeInt32(8, started_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeInt32(9, startFailed_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeInt32(10, completed_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeInt32(11, totalRequested_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBytes(12, getFailureMessageBytes()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + output.writeInt32(13, placementPolicy_); + } + for (int i = 0; i < containers_.size(); i++) { + output.writeBytes(14, containers_.getByteString(i)); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + output.writeInt32(15, failedRecently_); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + output.writeInt32(16, nodeFailed_); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + output.writeInt32(17, preempted_); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + output.writeInt32(18, pendingAntiAffineRequestCount_); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + output.writeBool(19, isAARequestOutstanding_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, priority_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, desired_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, actual_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, releasing_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, requested_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, failed_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, started_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, startFailed_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(10, completed_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(11, totalRequested_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(12, getFailureMessageBytes()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(13, placementPolicy_); + } + { + int dataSize = 0; + for (int i = 0; i < containers_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(containers_.getByteString(i)); + } + size += dataSize; + size += 1 * getContainersList().size(); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(15, failedRecently_); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(16, nodeFailed_); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(17, preempted_); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(18, pendingAntiAffineRequestCount_); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(19, isAARequestOutstanding_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.ComponentInformationProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.ComponentInformationProto other = (org.apache.slider.api.proto.Messages.ComponentInformationProto) obj; + + boolean result = true; + result = result && (hasName() == other.hasName()); + if (hasName()) { + result = result && getName() + .equals(other.getName()); + } + result = result && (hasPriority() == other.hasPriority()); + if (hasPriority()) { + result = result && (getPriority() + == other.getPriority()); + } + result = result && (hasDesired() == other.hasDesired()); + if (hasDesired()) { + result = result && (getDesired() + == other.getDesired()); + } + result = result && (hasActual() == other.hasActual()); + if (hasActual()) { + result = result && (getActual() + == other.getActual()); + } + result = result && (hasReleasing() == other.hasReleasing()); + if (hasReleasing()) { + result = result && (getReleasing() + == other.getReleasing()); + } + result = result && (hasRequested() == other.hasRequested()); + if (hasRequested()) { + result = result && (getRequested() + == other.getRequested()); + } + result = result && (hasFailed() == other.hasFailed()); + if (hasFailed()) { + result = result && (getFailed() + == other.getFailed()); + } + result = result && (hasStarted() == other.hasStarted()); + if (hasStarted()) { + result = result && (getStarted() + == other.getStarted()); + } + result = result && (hasStartFailed() == other.hasStartFailed()); + if (hasStartFailed()) { + result = result && (getStartFailed() + == other.getStartFailed()); + } + result = result && (hasCompleted() == other.hasCompleted()); + if (hasCompleted()) { + result = result && (getCompleted() + == other.getCompleted()); + } + result = result && (hasTotalRequested() == other.hasTotalRequested()); + if (hasTotalRequested()) { + result = result && (getTotalRequested() + == other.getTotalRequested()); + } + result = result && (hasFailureMessage() == other.hasFailureMessage()); + if (hasFailureMessage()) { + result = result && getFailureMessage() + .equals(other.getFailureMessage()); + } + result = result && (hasPlacementPolicy() == other.hasPlacementPolicy()); + if (hasPlacementPolicy()) { + result = result && (getPlacementPolicy() + == other.getPlacementPolicy()); + } + result = result && getContainersList() + .equals(other.getContainersList()); + result = result && (hasFailedRecently() == other.hasFailedRecently()); + if (hasFailedRecently()) { + result = result && (getFailedRecently() + == other.getFailedRecently()); + } + result = result && (hasNodeFailed() == other.hasNodeFailed()); + if (hasNodeFailed()) { + result = result && (getNodeFailed() + == other.getNodeFailed()); + } + result = result && (hasPreempted() == other.hasPreempted()); + if (hasPreempted()) { + result = result && (getPreempted() + == other.getPreempted()); + } + result = result && (hasPendingAntiAffineRequestCount() == other.hasPendingAntiAffineRequestCount()); + if (hasPendingAntiAffineRequestCount()) { + result = result && (getPendingAntiAffineRequestCount() + == other.getPendingAntiAffineRequestCount()); + } + result = result && (hasIsAARequestOutstanding() == other.hasIsAARequestOutstanding()); + if (hasIsAARequestOutstanding()) { + result = result && (getIsAARequestOutstanding() + == other.getIsAARequestOutstanding()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + if (hasPriority()) { + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + } + if (hasDesired()) { + hash = (37 * hash) + DESIRED_FIELD_NUMBER; + hash = (53 * hash) + getDesired(); + } + if (hasActual()) { + hash = (37 * hash) + ACTUAL_FIELD_NUMBER; + hash = (53 * hash) + getActual(); + } + if (hasReleasing()) { + hash = (37 * hash) + RELEASING_FIELD_NUMBER; + hash = (53 * hash) + getReleasing(); + } + if (hasRequested()) { + hash = (37 * hash) + REQUESTED_FIELD_NUMBER; + hash = (53 * hash) + getRequested(); + } + if (hasFailed()) { + hash = (37 * hash) + FAILED_FIELD_NUMBER; + hash = (53 * hash) + getFailed(); + } + if (hasStarted()) { + hash = (37 * hash) + STARTED_FIELD_NUMBER; + hash = (53 * hash) + getStarted(); + } + if (hasStartFailed()) { + hash = (37 * hash) + STARTFAILED_FIELD_NUMBER; + hash = (53 * hash) + getStartFailed(); + } + if (hasCompleted()) { + hash = (37 * hash) + COMPLETED_FIELD_NUMBER; + hash = (53 * hash) + getCompleted(); + } + if (hasTotalRequested()) { + hash = (37 * hash) + TOTALREQUESTED_FIELD_NUMBER; + hash = (53 * hash) + getTotalRequested(); + } + if (hasFailureMessage()) { + hash = (37 * hash) + FAILUREMESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getFailureMessage().hashCode(); + } + if (hasPlacementPolicy()) { + hash = (37 * hash) + PLACEMENTPOLICY_FIELD_NUMBER; + hash = (53 * hash) + getPlacementPolicy(); + } + if (getContainersCount() > 0) { + hash = (37 * hash) + CONTAINERS_FIELD_NUMBER; + hash = (53 * hash) + getContainersList().hashCode(); + } + if (hasFailedRecently()) { + hash = (37 * hash) + FAILEDRECENTLY_FIELD_NUMBER; + hash = (53 * hash) + getFailedRecently(); + } + if (hasNodeFailed()) { + hash = (37 * hash) + NODEFAILED_FIELD_NUMBER; + hash = (53 * hash) + getNodeFailed(); + } + if (hasPreempted()) { + hash = (37 * hash) + PREEMPTED_FIELD_NUMBER; + hash = (53 * hash) + getPreempted(); + } + if (hasPendingAntiAffineRequestCount()) { + hash = (37 * hash) + PENDINGANTIAFFINEREQUESTCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getPendingAntiAffineRequestCount(); + } + if (hasIsAARequestOutstanding()) { + hash = (37 * hash) + ISAAREQUESTOUTSTANDING_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getIsAARequestOutstanding()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ComponentInformationProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.ComponentInformationProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.ComponentInformationProto} + * + *
+     *
+     * see org.apache.slider.api.types.ComponentInformation
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.ComponentInformationProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ComponentInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ComponentInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ComponentInformationProto.class, org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.ComponentInformationProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + priority_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + desired_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + actual_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + releasing_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + requested_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + failed_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + started_ = 0; + bitField0_ = (bitField0_ & ~0x00000080); + startFailed_ = 0; + bitField0_ = (bitField0_ & ~0x00000100); + completed_ = 0; + bitField0_ = (bitField0_ & ~0x00000200); + totalRequested_ = 0; + bitField0_ = (bitField0_ & ~0x00000400); + failureMessage_ = ""; + bitField0_ = (bitField0_ & ~0x00000800); + placementPolicy_ = 0; + bitField0_ = (bitField0_ & ~0x00001000); + containers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00002000); + failedRecently_ = 0; + bitField0_ = (bitField0_ & ~0x00004000); + nodeFailed_ = 0; + bitField0_ = (bitField0_ & ~0x00008000); + preempted_ = 0; + bitField0_ = (bitField0_ & ~0x00010000); + pendingAntiAffineRequestCount_ = 0; + bitField0_ = (bitField0_ & ~0x00020000); + isAARequestOutstanding_ = false; + bitField0_ = (bitField0_ & ~0x00040000); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ComponentInformationProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.ComponentInformationProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.ComponentInformationProto build() { + org.apache.slider.api.proto.Messages.ComponentInformationProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.ComponentInformationProto buildPartial() { + org.apache.slider.api.proto.Messages.ComponentInformationProto result = new org.apache.slider.api.proto.Messages.ComponentInformationProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.priority_ = priority_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.desired_ = desired_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.actual_ = actual_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.releasing_ = releasing_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.requested_ = requested_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.failed_ = failed_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.started_ = started_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.startFailed_ = startFailed_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.completed_ = completed_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.totalRequested_ = totalRequested_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000800; + } + result.failureMessage_ = failureMessage_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00001000; + } + result.placementPolicy_ = placementPolicy_; + if (((bitField0_ & 0x00002000) == 0x00002000)) { + containers_ = new com.google.protobuf.UnmodifiableLazyStringList( + containers_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.containers_ = containers_; + if (((from_bitField0_ & 0x00004000) == 0x00004000)) { + to_bitField0_ |= 0x00002000; + } + result.failedRecently_ = failedRecently_; + if (((from_bitField0_ & 0x00008000) == 0x00008000)) { + to_bitField0_ |= 0x00004000; + } + result.nodeFailed_ = nodeFailed_; + if (((from_bitField0_ & 0x00010000) == 0x00010000)) { + to_bitField0_ |= 0x00008000; + } + result.preempted_ = preempted_; + if (((from_bitField0_ & 0x00020000) == 0x00020000)) { + to_bitField0_ |= 0x00010000; + } + result.pendingAntiAffineRequestCount_ = pendingAntiAffineRequestCount_; + if (((from_bitField0_ & 0x00040000) == 0x00040000)) { + to_bitField0_ |= 0x00020000; + } + result.isAARequestOutstanding_ = isAARequestOutstanding_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.ComponentInformationProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.ComponentInformationProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.ComponentInformationProto other) { + if (other == org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + if (other.hasPriority()) { + setPriority(other.getPriority()); + } + if (other.hasDesired()) { + setDesired(other.getDesired()); + } + if (other.hasActual()) { + setActual(other.getActual()); + } + if (other.hasReleasing()) { + setReleasing(other.getReleasing()); + } + if (other.hasRequested()) { + setRequested(other.getRequested()); + } + if (other.hasFailed()) { + setFailed(other.getFailed()); + } + if (other.hasStarted()) { + setStarted(other.getStarted()); + } + if (other.hasStartFailed()) { + setStartFailed(other.getStartFailed()); + } + if (other.hasCompleted()) { + setCompleted(other.getCompleted()); + } + if (other.hasTotalRequested()) { + setTotalRequested(other.getTotalRequested()); + } + if (other.hasFailureMessage()) { + bitField0_ |= 0x00000800; + failureMessage_ = other.failureMessage_; + onChanged(); + } + if (other.hasPlacementPolicy()) { + setPlacementPolicy(other.getPlacementPolicy()); + } + if (!other.containers_.isEmpty()) { + if (containers_.isEmpty()) { + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureContainersIsMutable(); + containers_.addAll(other.containers_); + } + onChanged(); + } + if (other.hasFailedRecently()) { + setFailedRecently(other.getFailedRecently()); + } + if (other.hasNodeFailed()) { + setNodeFailed(other.getNodeFailed()); + } + if (other.hasPreempted()) { + setPreempted(other.getPreempted()); + } + if (other.hasPendingAntiAffineRequestCount()) { + setPendingAntiAffineRequestCount(other.getPendingAntiAffineRequestCount()); + } + if (other.hasIsAARequestOutstanding()) { + setIsAARequestOutstanding(other.getIsAARequestOutstanding()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.ComponentInformationProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.ComponentInformationProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // optional int32 priority = 2; + private int priority_ ; + /** + * optional int32 priority = 2; + */ + public boolean hasPriority() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 priority = 2; + */ + public int getPriority() { + return priority_; + } + /** + * optional int32 priority = 2; + */ + public Builder setPriority(int value) { + bitField0_ |= 0x00000002; + priority_ = value; + onChanged(); + return this; + } + /** + * optional int32 priority = 2; + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000002); + priority_ = 0; + onChanged(); + return this; + } + + // optional int32 desired = 3; + private int desired_ ; + /** + * optional int32 desired = 3; + */ + public boolean hasDesired() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 desired = 3; + */ + public int getDesired() { + return desired_; + } + /** + * optional int32 desired = 3; + */ + public Builder setDesired(int value) { + bitField0_ |= 0x00000004; + desired_ = value; + onChanged(); + return this; + } + /** + * optional int32 desired = 3; + */ + public Builder clearDesired() { + bitField0_ = (bitField0_ & ~0x00000004); + desired_ = 0; + onChanged(); + return this; + } + + // optional int32 actual = 4; + private int actual_ ; + /** + * optional int32 actual = 4; + */ + public boolean hasActual() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 actual = 4; + */ + public int getActual() { + return actual_; + } + /** + * optional int32 actual = 4; + */ + public Builder setActual(int value) { + bitField0_ |= 0x00000008; + actual_ = value; + onChanged(); + return this; + } + /** + * optional int32 actual = 4; + */ + public Builder clearActual() { + bitField0_ = (bitField0_ & ~0x00000008); + actual_ = 0; + onChanged(); + return this; + } + + // optional int32 releasing = 5; + private int releasing_ ; + /** + * optional int32 releasing = 5; + */ + public boolean hasReleasing() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 releasing = 5; + */ + public int getReleasing() { + return releasing_; + } + /** + * optional int32 releasing = 5; + */ + public Builder setReleasing(int value) { + bitField0_ |= 0x00000010; + releasing_ = value; + onChanged(); + return this; + } + /** + * optional int32 releasing = 5; + */ + public Builder clearReleasing() { + bitField0_ = (bitField0_ & ~0x00000010); + releasing_ = 0; + onChanged(); + return this; + } + + // optional int32 requested = 6; + private int requested_ ; + /** + * optional int32 requested = 6; + */ + public boolean hasRequested() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 requested = 6; + */ + public int getRequested() { + return requested_; + } + /** + * optional int32 requested = 6; + */ + public Builder setRequested(int value) { + bitField0_ |= 0x00000020; + requested_ = value; + onChanged(); + return this; + } + /** + * optional int32 requested = 6; + */ + public Builder clearRequested() { + bitField0_ = (bitField0_ & ~0x00000020); + requested_ = 0; + onChanged(); + return this; + } + + // optional int32 failed = 7; + private int failed_ ; + /** + * optional int32 failed = 7; + */ + public boolean hasFailed() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int32 failed = 7; + */ + public int getFailed() { + return failed_; + } + /** + * optional int32 failed = 7; + */ + public Builder setFailed(int value) { + bitField0_ |= 0x00000040; + failed_ = value; + onChanged(); + return this; + } + /** + * optional int32 failed = 7; + */ + public Builder clearFailed() { + bitField0_ = (bitField0_ & ~0x00000040); + failed_ = 0; + onChanged(); + return this; + } + + // optional int32 started = 8; + private int started_ ; + /** + * optional int32 started = 8; + */ + public boolean hasStarted() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional int32 started = 8; + */ + public int getStarted() { + return started_; + } + /** + * optional int32 started = 8; + */ + public Builder setStarted(int value) { + bitField0_ |= 0x00000080; + started_ = value; + onChanged(); + return this; + } + /** + * optional int32 started = 8; + */ + public Builder clearStarted() { + bitField0_ = (bitField0_ & ~0x00000080); + started_ = 0; + onChanged(); + return this; + } + + // optional int32 startFailed = 9; + private int startFailed_ ; + /** + * optional int32 startFailed = 9; + */ + public boolean hasStartFailed() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional int32 startFailed = 9; + */ + public int getStartFailed() { + return startFailed_; + } + /** + * optional int32 startFailed = 9; + */ + public Builder setStartFailed(int value) { + bitField0_ |= 0x00000100; + startFailed_ = value; + onChanged(); + return this; + } + /** + * optional int32 startFailed = 9; + */ + public Builder clearStartFailed() { + bitField0_ = (bitField0_ & ~0x00000100); + startFailed_ = 0; + onChanged(); + return this; + } + + // optional int32 completed = 10; + private int completed_ ; + /** + * optional int32 completed = 10; + */ + public boolean hasCompleted() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional int32 completed = 10; + */ + public int getCompleted() { + return completed_; + } + /** + * optional int32 completed = 10; + */ + public Builder setCompleted(int value) { + bitField0_ |= 0x00000200; + completed_ = value; + onChanged(); + return this; + } + /** + * optional int32 completed = 10; + */ + public Builder clearCompleted() { + bitField0_ = (bitField0_ & ~0x00000200); + completed_ = 0; + onChanged(); + return this; + } + + // optional int32 totalRequested = 11; + private int totalRequested_ ; + /** + * optional int32 totalRequested = 11; + */ + public boolean hasTotalRequested() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional int32 totalRequested = 11; + */ + public int getTotalRequested() { + return totalRequested_; + } + /** + * optional int32 totalRequested = 11; + */ + public Builder setTotalRequested(int value) { + bitField0_ |= 0x00000400; + totalRequested_ = value; + onChanged(); + return this; + } + /** + * optional int32 totalRequested = 11; + */ + public Builder clearTotalRequested() { + bitField0_ = (bitField0_ & ~0x00000400); + totalRequested_ = 0; + onChanged(); + return this; + } + + // optional string failureMessage = 12; + private java.lang.Object failureMessage_ = ""; + /** + * optional string failureMessage = 12; + */ + public boolean hasFailureMessage() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string failureMessage = 12; + */ + public java.lang.String getFailureMessage() { + java.lang.Object ref = failureMessage_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + failureMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string failureMessage = 12; + */ + public com.google.protobuf.ByteString + getFailureMessageBytes() { + java.lang.Object ref = failureMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + failureMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string failureMessage = 12; + */ + public Builder setFailureMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + failureMessage_ = value; + onChanged(); + return this; + } + /** + * optional string failureMessage = 12; + */ + public Builder clearFailureMessage() { + bitField0_ = (bitField0_ & ~0x00000800); + failureMessage_ = getDefaultInstance().getFailureMessage(); + onChanged(); + return this; + } + /** + * optional string failureMessage = 12; + */ + public Builder setFailureMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + failureMessage_ = value; + onChanged(); + return this; + } + + // optional int32 placementPolicy = 13; + private int placementPolicy_ ; + /** + * optional int32 placementPolicy = 13; + */ + public boolean hasPlacementPolicy() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional int32 placementPolicy = 13; + */ + public int getPlacementPolicy() { + return placementPolicy_; + } + /** + * optional int32 placementPolicy = 13; + */ + public Builder setPlacementPolicy(int value) { + bitField0_ |= 0x00001000; + placementPolicy_ = value; + onChanged(); + return this; + } + /** + * optional int32 placementPolicy = 13; + */ + public Builder clearPlacementPolicy() { + bitField0_ = (bitField0_ & ~0x00001000); + placementPolicy_ = 0; + onChanged(); + return this; + } + + // repeated string containers = 14; + private com.google.protobuf.LazyStringList containers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureContainersIsMutable() { + if (!((bitField0_ & 0x00002000) == 0x00002000)) { + containers_ = new com.google.protobuf.LazyStringArrayList(containers_); + bitField0_ |= 0x00002000; + } + } + /** + * repeated string containers = 14; + */ + public java.util.List + getContainersList() { + return java.util.Collections.unmodifiableList(containers_); + } + /** + * repeated string containers = 14; + */ + public int getContainersCount() { + return containers_.size(); + } + /** + * repeated string containers = 14; + */ + public java.lang.String getContainers(int index) { + return containers_.get(index); + } + /** + * repeated string containers = 14; + */ + public com.google.protobuf.ByteString + getContainersBytes(int index) { + return containers_.getByteString(index); + } + /** + * repeated string containers = 14; + */ + public Builder setContainers( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string containers = 14; + */ + public Builder addContainers( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(value); + onChanged(); + return this; + } + /** + * repeated string containers = 14; + */ + public Builder addAllContainers( + java.lang.Iterable values) { + ensureContainersIsMutable(); + super.addAll(values, containers_); + onChanged(); + return this; + } + /** + * repeated string containers = 14; + */ + public Builder clearContainers() { + containers_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * repeated string containers = 14; + */ + public Builder addContainersBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(value); + onChanged(); + return this; + } + + // optional int32 failedRecently = 15; + private int failedRecently_ ; + /** + * optional int32 failedRecently = 15; + */ + public boolean hasFailedRecently() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional int32 failedRecently = 15; + */ + public int getFailedRecently() { + return failedRecently_; + } + /** + * optional int32 failedRecently = 15; + */ + public Builder setFailedRecently(int value) { + bitField0_ |= 0x00004000; + failedRecently_ = value; + onChanged(); + return this; + } + /** + * optional int32 failedRecently = 15; + */ + public Builder clearFailedRecently() { + bitField0_ = (bitField0_ & ~0x00004000); + failedRecently_ = 0; + onChanged(); + return this; + } + + // optional int32 nodeFailed = 16; + private int nodeFailed_ ; + /** + * optional int32 nodeFailed = 16; + */ + public boolean hasNodeFailed() { + return ((bitField0_ & 0x00008000) == 0x00008000); + } + /** + * optional int32 nodeFailed = 16; + */ + public int getNodeFailed() { + return nodeFailed_; + } + /** + * optional int32 nodeFailed = 16; + */ + public Builder setNodeFailed(int value) { + bitField0_ |= 0x00008000; + nodeFailed_ = value; + onChanged(); + return this; + } + /** + * optional int32 nodeFailed = 16; + */ + public Builder clearNodeFailed() { + bitField0_ = (bitField0_ & ~0x00008000); + nodeFailed_ = 0; + onChanged(); + return this; + } + + // optional int32 preempted = 17; + private int preempted_ ; + /** + * optional int32 preempted = 17; + */ + public boolean hasPreempted() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional int32 preempted = 17; + */ + public int getPreempted() { + return preempted_; + } + /** + * optional int32 preempted = 17; + */ + public Builder setPreempted(int value) { + bitField0_ |= 0x00010000; + preempted_ = value; + onChanged(); + return this; + } + /** + * optional int32 preempted = 17; + */ + public Builder clearPreempted() { + bitField0_ = (bitField0_ & ~0x00010000); + preempted_ = 0; + onChanged(); + return this; + } + + // optional int32 pendingAntiAffineRequestCount = 18; + private int pendingAntiAffineRequestCount_ ; + /** + * optional int32 pendingAntiAffineRequestCount = 18; + */ + public boolean hasPendingAntiAffineRequestCount() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional int32 pendingAntiAffineRequestCount = 18; + */ + public int getPendingAntiAffineRequestCount() { + return pendingAntiAffineRequestCount_; + } + /** + * optional int32 pendingAntiAffineRequestCount = 18; + */ + public Builder setPendingAntiAffineRequestCount(int value) { + bitField0_ |= 0x00020000; + pendingAntiAffineRequestCount_ = value; + onChanged(); + return this; + } + /** + * optional int32 pendingAntiAffineRequestCount = 18; + */ + public Builder clearPendingAntiAffineRequestCount() { + bitField0_ = (bitField0_ & ~0x00020000); + pendingAntiAffineRequestCount_ = 0; + onChanged(); + return this; + } + + // optional bool isAARequestOutstanding = 19; + private boolean isAARequestOutstanding_ ; + /** + * optional bool isAARequestOutstanding = 19; + */ + public boolean hasIsAARequestOutstanding() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional bool isAARequestOutstanding = 19; + */ + public boolean getIsAARequestOutstanding() { + return isAARequestOutstanding_; + } + /** + * optional bool isAARequestOutstanding = 19; + */ + public Builder setIsAARequestOutstanding(boolean value) { + bitField0_ |= 0x00040000; + isAARequestOutstanding_ = value; + onChanged(); + return this; + } + /** + * optional bool isAARequestOutstanding = 19; + */ + public Builder clearIsAARequestOutstanding() { + bitField0_ = (bitField0_ & ~0x00040000); + isAARequestOutstanding_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.ComponentInformationProto) + } + + static { + defaultInstance = new ComponentInformationProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.ComponentInformationProto) + } + + public interface ContainerInformationProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string containerId = 1; + /** + * optional string containerId = 1; + */ + boolean hasContainerId(); + /** + * optional string containerId = 1; + */ + java.lang.String getContainerId(); + /** + * optional string containerId = 1; + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + // optional string component = 2; + /** + * optional string component = 2; + */ + boolean hasComponent(); + /** + * optional string component = 2; + */ + java.lang.String getComponent(); + /** + * optional string component = 2; + */ + com.google.protobuf.ByteString + getComponentBytes(); + + // optional bool released = 3; + /** + * optional bool released = 3; + */ + boolean hasReleased(); + /** + * optional bool released = 3; + */ + boolean getReleased(); + + // optional int32 state = 4; + /** + * optional int32 state = 4; + */ + boolean hasState(); + /** + * optional int32 state = 4; + */ + int getState(); + + // optional int32 exitCode = 5; + /** + * optional int32 exitCode = 5; + */ + boolean hasExitCode(); + /** + * optional int32 exitCode = 5; + */ + int getExitCode(); + + // optional string diagnostics = 6; + /** + * optional string diagnostics = 6; + */ + boolean hasDiagnostics(); + /** + * optional string diagnostics = 6; + */ + java.lang.String getDiagnostics(); + /** + * optional string diagnostics = 6; + */ + com.google.protobuf.ByteString + getDiagnosticsBytes(); + + // optional int64 createTime = 7; + /** + * optional int64 createTime = 7; + */ + boolean hasCreateTime(); + /** + * optional int64 createTime = 7; + */ + long getCreateTime(); + + // optional int64 startTime = 8; + /** + * optional int64 startTime = 8; + */ + boolean hasStartTime(); + /** + * optional int64 startTime = 8; + */ + long getStartTime(); + + // repeated string output = 9; + /** + * repeated string output = 9; + */ + java.util.List + getOutputList(); + /** + * repeated string output = 9; + */ + int getOutputCount(); + /** + * repeated string output = 9; + */ + java.lang.String getOutput(int index); + /** + * repeated string output = 9; + */ + com.google.protobuf.ByteString + getOutputBytes(int index); + + // optional string host = 10; + /** + * optional string host = 10; + */ + boolean hasHost(); + /** + * optional string host = 10; + */ + java.lang.String getHost(); + /** + * optional string host = 10; + */ + com.google.protobuf.ByteString + getHostBytes(); + + // optional string hostURL = 11; + /** + * optional string hostURL = 11; + */ + boolean hasHostURL(); + /** + * optional string hostURL = 11; + */ + java.lang.String getHostURL(); + /** + * optional string hostURL = 11; + */ + com.google.protobuf.ByteString + getHostURLBytes(); + + // optional string placement = 12; + /** + * optional string placement = 12; + */ + boolean hasPlacement(); + /** + * optional string placement = 12; + */ + java.lang.String getPlacement(); + /** + * optional string placement = 12; + */ + com.google.protobuf.ByteString + getPlacementBytes(); + + // optional string appVersion = 13; + /** + * optional string appVersion = 13; + */ + boolean hasAppVersion(); + /** + * optional string appVersion = 13; + */ + java.lang.String getAppVersion(); + /** + * optional string appVersion = 13; + */ + com.google.protobuf.ByteString + getAppVersionBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.ContainerInformationProto} + * + *
+   *
+   * see org.apache.slider.api.types.ContainerInformation
+   * 
+ */ + public static final class ContainerInformationProto extends + com.google.protobuf.GeneratedMessage + implements ContainerInformationProtoOrBuilder { + // Use ContainerInformationProto.newBuilder() to construct. + private ContainerInformationProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ContainerInformationProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ContainerInformationProto defaultInstance; + public static ContainerInformationProto getDefaultInstance() { + return defaultInstance; + } + + public ContainerInformationProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ContainerInformationProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + containerId_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + component_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + released_ = input.readBool(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + state_ = input.readInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + exitCode_ = input.readInt32(); + break; + } + case 50: { + bitField0_ |= 0x00000020; + diagnostics_ = input.readBytes(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + createTime_ = input.readInt64(); + break; + } + case 64: { + bitField0_ |= 0x00000080; + startTime_ = input.readInt64(); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + output_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000100; + } + output_.add(input.readBytes()); + break; + } + case 82: { + bitField0_ |= 0x00000100; + host_ = input.readBytes(); + break; + } + case 90: { + bitField0_ |= 0x00000200; + hostURL_ = input.readBytes(); + break; + } + case 98: { + bitField0_ |= 0x00000400; + placement_ = input.readBytes(); + break; + } + case 106: { + bitField0_ |= 0x00000800; + appVersion_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + output_ = new com.google.protobuf.UnmodifiableLazyStringList(output_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ContainerInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ContainerInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ContainerInformationProto.class, org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ContainerInformationProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerInformationProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string containerId = 1; + public static final int CONTAINERID_FIELD_NUMBER = 1; + private java.lang.Object containerId_; + /** + * optional string containerId = 1; + */ + public boolean hasContainerId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string containerId = 1; + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + containerId_ = s; + } + return s; + } + } + /** + * optional string containerId = 1; + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string component = 2; + public static final int COMPONENT_FIELD_NUMBER = 2; + private java.lang.Object component_; + /** + * optional string component = 2; + */ + public boolean hasComponent() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string component = 2; + */ + public java.lang.String getComponent() { + java.lang.Object ref = component_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + component_ = s; + } + return s; + } + } + /** + * optional string component = 2; + */ + public com.google.protobuf.ByteString + getComponentBytes() { + java.lang.Object ref = component_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + component_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bool released = 3; + public static final int RELEASED_FIELD_NUMBER = 3; + private boolean released_; + /** + * optional bool released = 3; + */ + public boolean hasReleased() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool released = 3; + */ + public boolean getReleased() { + return released_; + } + + // optional int32 state = 4; + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * optional int32 state = 4; + */ + public boolean hasState() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 state = 4; + */ + public int getState() { + return state_; + } + + // optional int32 exitCode = 5; + public static final int EXITCODE_FIELD_NUMBER = 5; + private int exitCode_; + /** + * optional int32 exitCode = 5; + */ + public boolean hasExitCode() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 exitCode = 5; + */ + public int getExitCode() { + return exitCode_; + } + + // optional string diagnostics = 6; + public static final int DIAGNOSTICS_FIELD_NUMBER = 6; + private java.lang.Object diagnostics_; + /** + * optional string diagnostics = 6; + */ + public boolean hasDiagnostics() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string diagnostics = 6; + */ + public java.lang.String getDiagnostics() { + java.lang.Object ref = diagnostics_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + diagnostics_ = s; + } + return s; + } + } + /** + * optional string diagnostics = 6; + */ + public com.google.protobuf.ByteString + getDiagnosticsBytes() { + java.lang.Object ref = diagnostics_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + diagnostics_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int64 createTime = 7; + public static final int CREATETIME_FIELD_NUMBER = 7; + private long createTime_; + /** + * optional int64 createTime = 7; + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int64 createTime = 7; + */ + public long getCreateTime() { + return createTime_; + } + + // optional int64 startTime = 8; + public static final int STARTTIME_FIELD_NUMBER = 8; + private long startTime_; + /** + * optional int64 startTime = 8; + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional int64 startTime = 8; + */ + public long getStartTime() { + return startTime_; + } + + // repeated string output = 9; + public static final int OUTPUT_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList output_; + /** + * repeated string output = 9; + */ + public java.util.List + getOutputList() { + return output_; + } + /** + * repeated string output = 9; + */ + public int getOutputCount() { + return output_.size(); + } + /** + * repeated string output = 9; + */ + public java.lang.String getOutput(int index) { + return output_.get(index); + } + /** + * repeated string output = 9; + */ + public com.google.protobuf.ByteString + getOutputBytes(int index) { + return output_.getByteString(index); + } + + // optional string host = 10; + public static final int HOST_FIELD_NUMBER = 10; + private java.lang.Object host_; + /** + * optional string host = 10; + */ + public boolean hasHost() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional string host = 10; + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + host_ = s; + } + return s; + } + } + /** + * optional string host = 10; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string hostURL = 11; + public static final int HOSTURL_FIELD_NUMBER = 11; + private java.lang.Object hostURL_; + /** + * optional string hostURL = 11; + */ + public boolean hasHostURL() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional string hostURL = 11; + */ + public java.lang.String getHostURL() { + java.lang.Object ref = hostURL_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + hostURL_ = s; + } + return s; + } + } + /** + * optional string hostURL = 11; + */ + public com.google.protobuf.ByteString + getHostURLBytes() { + java.lang.Object ref = hostURL_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostURL_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string placement = 12; + public static final int PLACEMENT_FIELD_NUMBER = 12; + private java.lang.Object placement_; + /** + * optional string placement = 12; + */ + public boolean hasPlacement() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional string placement = 12; + */ + public java.lang.String getPlacement() { + java.lang.Object ref = placement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + placement_ = s; + } + return s; + } + } + /** + * optional string placement = 12; + */ + public com.google.protobuf.ByteString + getPlacementBytes() { + java.lang.Object ref = placement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + placement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string appVersion = 13; + public static final int APPVERSION_FIELD_NUMBER = 13; + private java.lang.Object appVersion_; + /** + * optional string appVersion = 13; + */ + public boolean hasAppVersion() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string appVersion = 13; + */ + public java.lang.String getAppVersion() { + java.lang.Object ref = appVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + appVersion_ = s; + } + return s; + } + } + /** + * optional string appVersion = 13; + */ + public com.google.protobuf.ByteString + getAppVersionBytes() { + java.lang.Object ref = appVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + containerId_ = ""; + component_ = ""; + released_ = false; + state_ = 0; + exitCode_ = 0; + diagnostics_ = ""; + createTime_ = 0L; + startTime_ = 0L; + output_ = com.google.protobuf.LazyStringArrayList.EMPTY; + host_ = ""; + hostURL_ = ""; + placement_ = ""; + appVersion_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getContainerIdBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getComponentBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, released_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(4, state_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, exitCode_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, getDiagnosticsBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeInt64(7, createTime_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeInt64(8, startTime_); + } + for (int i = 0; i < output_.size(); i++) { + output.writeBytes(9, output_.getByteString(i)); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBytes(10, getHostBytes()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeBytes(11, getHostURLBytes()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBytes(12, getPlacementBytes()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBytes(13, getAppVersionBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getContainerIdBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getComponentBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, released_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, state_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, exitCode_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, getDiagnosticsBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, createTime_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, startTime_); + } + { + int dataSize = 0; + for (int i = 0; i < output_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(output_.getByteString(i)); + } + size += dataSize; + size += 1 * getOutputList().size(); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(10, getHostBytes()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getHostURLBytes()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(12, getPlacementBytes()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(13, getAppVersionBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.ContainerInformationProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.ContainerInformationProto other = (org.apache.slider.api.proto.Messages.ContainerInformationProto) obj; + + boolean result = true; + result = result && (hasContainerId() == other.hasContainerId()); + if (hasContainerId()) { + result = result && getContainerId() + .equals(other.getContainerId()); + } + result = result && (hasComponent() == other.hasComponent()); + if (hasComponent()) { + result = result && getComponent() + .equals(other.getComponent()); + } + result = result && (hasReleased() == other.hasReleased()); + if (hasReleased()) { + result = result && (getReleased() + == other.getReleased()); + } + result = result && (hasState() == other.hasState()); + if (hasState()) { + result = result && (getState() + == other.getState()); + } + result = result && (hasExitCode() == other.hasExitCode()); + if (hasExitCode()) { + result = result && (getExitCode() + == other.getExitCode()); + } + result = result && (hasDiagnostics() == other.hasDiagnostics()); + if (hasDiagnostics()) { + result = result && getDiagnostics() + .equals(other.getDiagnostics()); + } + result = result && (hasCreateTime() == other.hasCreateTime()); + if (hasCreateTime()) { + result = result && (getCreateTime() + == other.getCreateTime()); + } + result = result && (hasStartTime() == other.hasStartTime()); + if (hasStartTime()) { + result = result && (getStartTime() + == other.getStartTime()); + } + result = result && getOutputList() + .equals(other.getOutputList()); + result = result && (hasHost() == other.hasHost()); + if (hasHost()) { + result = result && getHost() + .equals(other.getHost()); + } + result = result && (hasHostURL() == other.hasHostURL()); + if (hasHostURL()) { + result = result && getHostURL() + .equals(other.getHostURL()); + } + result = result && (hasPlacement() == other.hasPlacement()); + if (hasPlacement()) { + result = result && getPlacement() + .equals(other.getPlacement()); + } + result = result && (hasAppVersion() == other.hasAppVersion()); + if (hasAppVersion()) { + result = result && getAppVersion() + .equals(other.getAppVersion()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasContainerId()) { + hash = (37 * hash) + CONTAINERID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + } + if (hasComponent()) { + hash = (37 * hash) + COMPONENT_FIELD_NUMBER; + hash = (53 * hash) + getComponent().hashCode(); + } + if (hasReleased()) { + hash = (37 * hash) + RELEASED_FIELD_NUMBER; + hash = (53 * hash) + hashBoolean(getReleased()); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState(); + } + if (hasExitCode()) { + hash = (37 * hash) + EXITCODE_FIELD_NUMBER; + hash = (53 * hash) + getExitCode(); + } + if (hasDiagnostics()) { + hash = (37 * hash) + DIAGNOSTICS_FIELD_NUMBER; + hash = (53 * hash) + getDiagnostics().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATETIME_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getCreateTime()); + } + if (hasStartTime()) { + hash = (37 * hash) + STARTTIME_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getStartTime()); + } + if (getOutputCount() > 0) { + hash = (37 * hash) + OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getOutputList().hashCode(); + } + if (hasHost()) { + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + } + if (hasHostURL()) { + hash = (37 * hash) + HOSTURL_FIELD_NUMBER; + hash = (53 * hash) + getHostURL().hashCode(); + } + if (hasPlacement()) { + hash = (37 * hash) + PLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + getPlacement().hashCode(); + } + if (hasAppVersion()) { + hash = (37 * hash) + APPVERSION_FIELD_NUMBER; + hash = (53 * hash) + getAppVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.ContainerInformationProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.ContainerInformationProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.ContainerInformationProto} + * + *
+     *
+     * see org.apache.slider.api.types.ContainerInformation
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.ContainerInformationProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ContainerInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ContainerInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.ContainerInformationProto.class, org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.ContainerInformationProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + containerId_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + component_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + released_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + exitCode_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + diagnostics_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000040); + startTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000080); + output_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + host_ = ""; + bitField0_ = (bitField0_ & ~0x00000200); + hostURL_ = ""; + bitField0_ = (bitField0_ & ~0x00000400); + placement_ = ""; + bitField0_ = (bitField0_ & ~0x00000800); + appVersion_ = ""; + bitField0_ = (bitField0_ & ~0x00001000); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_ContainerInformationProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.ContainerInformationProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.ContainerInformationProto build() { + org.apache.slider.api.proto.Messages.ContainerInformationProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.ContainerInformationProto buildPartial() { + org.apache.slider.api.proto.Messages.ContainerInformationProto result = new org.apache.slider.api.proto.Messages.ContainerInformationProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.containerId_ = containerId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.component_ = component_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.released_ = released_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.state_ = state_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.exitCode_ = exitCode_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.diagnostics_ = diagnostics_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.createTime_ = createTime_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.startTime_ = startTime_; + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output_ = new com.google.protobuf.UnmodifiableLazyStringList( + output_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.output_ = output_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000100; + } + result.host_ = host_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000200; + } + result.hostURL_ = hostURL_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000400; + } + result.placement_ = placement_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00000800; + } + result.appVersion_ = appVersion_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.ContainerInformationProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.ContainerInformationProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.ContainerInformationProto other) { + if (other == org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance()) return this; + if (other.hasContainerId()) { + bitField0_ |= 0x00000001; + containerId_ = other.containerId_; + onChanged(); + } + if (other.hasComponent()) { + bitField0_ |= 0x00000002; + component_ = other.component_; + onChanged(); + } + if (other.hasReleased()) { + setReleased(other.getReleased()); + } + if (other.hasState()) { + setState(other.getState()); + } + if (other.hasExitCode()) { + setExitCode(other.getExitCode()); + } + if (other.hasDiagnostics()) { + bitField0_ |= 0x00000020; + diagnostics_ = other.diagnostics_; + onChanged(); + } + if (other.hasCreateTime()) { + setCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + setStartTime(other.getStartTime()); + } + if (!other.output_.isEmpty()) { + if (output_.isEmpty()) { + output_ = other.output_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureOutputIsMutable(); + output_.addAll(other.output_); + } + onChanged(); + } + if (other.hasHost()) { + bitField0_ |= 0x00000200; + host_ = other.host_; + onChanged(); + } + if (other.hasHostURL()) { + bitField0_ |= 0x00000400; + hostURL_ = other.hostURL_; + onChanged(); + } + if (other.hasPlacement()) { + bitField0_ |= 0x00000800; + placement_ = other.placement_; + onChanged(); + } + if (other.hasAppVersion()) { + bitField0_ |= 0x00001000; + appVersion_ = other.appVersion_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.ContainerInformationProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.ContainerInformationProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string containerId = 1; + private java.lang.Object containerId_ = ""; + /** + * optional string containerId = 1; + */ + public boolean hasContainerId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string containerId = 1; + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string containerId = 1; + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string containerId = 1; + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + containerId_ = value; + onChanged(); + return this; + } + /** + * optional string containerId = 1; + */ + public Builder clearContainerId() { + bitField0_ = (bitField0_ & ~0x00000001); + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * optional string containerId = 1; + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + containerId_ = value; + onChanged(); + return this; + } + + // optional string component = 2; + private java.lang.Object component_ = ""; + /** + * optional string component = 2; + */ + public boolean hasComponent() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string component = 2; + */ + public java.lang.String getComponent() { + java.lang.Object ref = component_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + component_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string component = 2; + */ + public com.google.protobuf.ByteString + getComponentBytes() { + java.lang.Object ref = component_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + component_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string component = 2; + */ + public Builder setComponent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + component_ = value; + onChanged(); + return this; + } + /** + * optional string component = 2; + */ + public Builder clearComponent() { + bitField0_ = (bitField0_ & ~0x00000002); + component_ = getDefaultInstance().getComponent(); + onChanged(); + return this; + } + /** + * optional string component = 2; + */ + public Builder setComponentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + component_ = value; + onChanged(); + return this; + } + + // optional bool released = 3; + private boolean released_ ; + /** + * optional bool released = 3; + */ + public boolean hasReleased() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool released = 3; + */ + public boolean getReleased() { + return released_; + } + /** + * optional bool released = 3; + */ + public Builder setReleased(boolean value) { + bitField0_ |= 0x00000004; + released_ = value; + onChanged(); + return this; + } + /** + * optional bool released = 3; + */ + public Builder clearReleased() { + bitField0_ = (bitField0_ & ~0x00000004); + released_ = false; + onChanged(); + return this; + } + + // optional int32 state = 4; + private int state_ ; + /** + * optional int32 state = 4; + */ + public boolean hasState() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 state = 4; + */ + public int getState() { + return state_; + } + /** + * optional int32 state = 4; + */ + public Builder setState(int value) { + bitField0_ |= 0x00000008; + state_ = value; + onChanged(); + return this; + } + /** + * optional int32 state = 4; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + // optional int32 exitCode = 5; + private int exitCode_ ; + /** + * optional int32 exitCode = 5; + */ + public boolean hasExitCode() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 exitCode = 5; + */ + public int getExitCode() { + return exitCode_; + } + /** + * optional int32 exitCode = 5; + */ + public Builder setExitCode(int value) { + bitField0_ |= 0x00000010; + exitCode_ = value; + onChanged(); + return this; + } + /** + * optional int32 exitCode = 5; + */ + public Builder clearExitCode() { + bitField0_ = (bitField0_ & ~0x00000010); + exitCode_ = 0; + onChanged(); + return this; + } + + // optional string diagnostics = 6; + private java.lang.Object diagnostics_ = ""; + /** + * optional string diagnostics = 6; + */ + public boolean hasDiagnostics() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string diagnostics = 6; + */ + public java.lang.String getDiagnostics() { + java.lang.Object ref = diagnostics_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + diagnostics_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string diagnostics = 6; + */ + public com.google.protobuf.ByteString + getDiagnosticsBytes() { + java.lang.Object ref = diagnostics_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + diagnostics_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string diagnostics = 6; + */ + public Builder setDiagnostics( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + diagnostics_ = value; + onChanged(); + return this; + } + /** + * optional string diagnostics = 6; + */ + public Builder clearDiagnostics() { + bitField0_ = (bitField0_ & ~0x00000020); + diagnostics_ = getDefaultInstance().getDiagnostics(); + onChanged(); + return this; + } + /** + * optional string diagnostics = 6; + */ + public Builder setDiagnosticsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + diagnostics_ = value; + onChanged(); + return this; + } + + // optional int64 createTime = 7; + private long createTime_ ; + /** + * optional int64 createTime = 7; + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int64 createTime = 7; + */ + public long getCreateTime() { + return createTime_; + } + /** + * optional int64 createTime = 7; + */ + public Builder setCreateTime(long value) { + bitField0_ |= 0x00000040; + createTime_ = value; + onChanged(); + return this; + } + /** + * optional int64 createTime = 7; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = 0L; + onChanged(); + return this; + } + + // optional int64 startTime = 8; + private long startTime_ ; + /** + * optional int64 startTime = 8; + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional int64 startTime = 8; + */ + public long getStartTime() { + return startTime_; + } + /** + * optional int64 startTime = 8; + */ + public Builder setStartTime(long value) { + bitField0_ |= 0x00000080; + startTime_ = value; + onChanged(); + return this; + } + /** + * optional int64 startTime = 8; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000080); + startTime_ = 0L; + onChanged(); + return this; + } + + // repeated string output = 9; + private com.google.protobuf.LazyStringList output_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureOutputIsMutable() { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { + output_ = new com.google.protobuf.LazyStringArrayList(output_); + bitField0_ |= 0x00000100; + } + } + /** + * repeated string output = 9; + */ + public java.util.List + getOutputList() { + return java.util.Collections.unmodifiableList(output_); + } + /** + * repeated string output = 9; + */ + public int getOutputCount() { + return output_.size(); + } + /** + * repeated string output = 9; + */ + public java.lang.String getOutput(int index) { + return output_.get(index); + } + /** + * repeated string output = 9; + */ + public com.google.protobuf.ByteString + getOutputBytes(int index) { + return output_.getByteString(index); + } + /** + * repeated string output = 9; + */ + public Builder setOutput( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string output = 9; + */ + public Builder addOutput( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(value); + onChanged(); + return this; + } + /** + * repeated string output = 9; + */ + public Builder addAllOutput( + java.lang.Iterable values) { + ensureOutputIsMutable(); + super.addAll(values, output_); + onChanged(); + return this; + } + /** + * repeated string output = 9; + */ + public Builder clearOutput() { + output_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * repeated string output = 9; + */ + public Builder addOutputBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(value); + onChanged(); + return this; + } + + // optional string host = 10; + private java.lang.Object host_ = ""; + /** + * optional string host = 10; + */ + public boolean hasHost() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional string host = 10; + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string host = 10; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string host = 10; + */ + public Builder setHost( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + host_ = value; + onChanged(); + return this; + } + /** + * optional string host = 10; + */ + public Builder clearHost() { + bitField0_ = (bitField0_ & ~0x00000200); + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + * optional string host = 10; + */ + public Builder setHostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + host_ = value; + onChanged(); + return this; + } + + // optional string hostURL = 11; + private java.lang.Object hostURL_ = ""; + /** + * optional string hostURL = 11; + */ + public boolean hasHostURL() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional string hostURL = 11; + */ + public java.lang.String getHostURL() { + java.lang.Object ref = hostURL_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + hostURL_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string hostURL = 11; + */ + public com.google.protobuf.ByteString + getHostURLBytes() { + java.lang.Object ref = hostURL_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostURL_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string hostURL = 11; + */ + public Builder setHostURL( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + hostURL_ = value; + onChanged(); + return this; + } + /** + * optional string hostURL = 11; + */ + public Builder clearHostURL() { + bitField0_ = (bitField0_ & ~0x00000400); + hostURL_ = getDefaultInstance().getHostURL(); + onChanged(); + return this; + } + /** + * optional string hostURL = 11; + */ + public Builder setHostURLBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + hostURL_ = value; + onChanged(); + return this; + } + + // optional string placement = 12; + private java.lang.Object placement_ = ""; + /** + * optional string placement = 12; + */ + public boolean hasPlacement() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string placement = 12; + */ + public java.lang.String getPlacement() { + java.lang.Object ref = placement_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + placement_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string placement = 12; + */ + public com.google.protobuf.ByteString + getPlacementBytes() { + java.lang.Object ref = placement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + placement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string placement = 12; + */ + public Builder setPlacement( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + placement_ = value; + onChanged(); + return this; + } + /** + * optional string placement = 12; + */ + public Builder clearPlacement() { + bitField0_ = (bitField0_ & ~0x00000800); + placement_ = getDefaultInstance().getPlacement(); + onChanged(); + return this; + } + /** + * optional string placement = 12; + */ + public Builder setPlacementBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + placement_ = value; + onChanged(); + return this; + } + + // optional string appVersion = 13; + private java.lang.Object appVersion_ = ""; + /** + * optional string appVersion = 13; + */ + public boolean hasAppVersion() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional string appVersion = 13; + */ + public java.lang.String getAppVersion() { + java.lang.Object ref = appVersion_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + appVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string appVersion = 13; + */ + public com.google.protobuf.ByteString + getAppVersionBytes() { + java.lang.Object ref = appVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string appVersion = 13; + */ + public Builder setAppVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + appVersion_ = value; + onChanged(); + return this; + } + /** + * optional string appVersion = 13; + */ + public Builder clearAppVersion() { + bitField0_ = (bitField0_ & ~0x00001000); + appVersion_ = getDefaultInstance().getAppVersion(); + onChanged(); + return this; + } + /** + * optional string appVersion = 13; + */ + public Builder setAppVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + appVersion_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.ContainerInformationProto) + } + + static { + defaultInstance = new ContainerInformationProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.ContainerInformationProto) + } + + public interface PingInformationProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string text = 1; + /** + * optional string text = 1; + */ + boolean hasText(); + /** + * optional string text = 1; + */ + java.lang.String getText(); + /** + * optional string text = 1; + */ + com.google.protobuf.ByteString + getTextBytes(); + + // optional string verb = 2; + /** + * optional string verb = 2; + */ + boolean hasVerb(); + /** + * optional string verb = 2; + */ + java.lang.String getVerb(); + /** + * optional string verb = 2; + */ + com.google.protobuf.ByteString + getVerbBytes(); + + // optional string body = 3; + /** + * optional string body = 3; + */ + boolean hasBody(); + /** + * optional string body = 3; + */ + java.lang.String getBody(); + /** + * optional string body = 3; + */ + com.google.protobuf.ByteString + getBodyBytes(); + + // optional int64 time = 4; + /** + * optional int64 time = 4; + */ + boolean hasTime(); + /** + * optional int64 time = 4; + */ + long getTime(); + } + /** + * Protobuf type {@code org.apache.slider.api.PingInformationProto} + * + *
+   *
+   * see org.apache.slider.api.types.PingInformation
+   * 
+ */ + public static final class PingInformationProto extends + com.google.protobuf.GeneratedMessage + implements PingInformationProtoOrBuilder { + // Use PingInformationProto.newBuilder() to construct. + private PingInformationProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private PingInformationProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final PingInformationProto defaultInstance; + public static PingInformationProto getDefaultInstance() { + return defaultInstance; + } + + public PingInformationProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PingInformationProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + text_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + verb_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + body_ = input.readBytes(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + time_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_PingInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_PingInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.PingInformationProto.class, org.apache.slider.api.proto.Messages.PingInformationProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public PingInformationProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PingInformationProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string text = 1; + public static final int TEXT_FIELD_NUMBER = 1; + private java.lang.Object text_; + /** + * optional string text = 1; + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + text_ = s; + } + return s; + } + } + /** + * optional string text = 1; + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string verb = 2; + public static final int VERB_FIELD_NUMBER = 2; + private java.lang.Object verb_; + /** + * optional string verb = 2; + */ + public boolean hasVerb() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string verb = 2; + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + verb_ = s; + } + return s; + } + } + /** + * optional string verb = 2; + */ + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string body = 3; + public static final int BODY_FIELD_NUMBER = 3; + private java.lang.Object body_; + /** + * optional string body = 3; + */ + public boolean hasBody() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string body = 3; + */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + body_ = s; + } + return s; + } + } + /** + * optional string body = 3; + */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int64 time = 4; + public static final int TIME_FIELD_NUMBER = 4; + private long time_; + /** + * optional int64 time = 4; + */ + public boolean hasTime() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int64 time = 4; + */ + public long getTime() { + return time_; + } + + private void initFields() { + text_ = ""; + verb_ = ""; + body_ = ""; + time_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTextBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getVerbBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getBodyBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, time_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTextBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getVerbBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getBodyBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.PingInformationProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.PingInformationProto other = (org.apache.slider.api.proto.Messages.PingInformationProto) obj; + + boolean result = true; + result = result && (hasText() == other.hasText()); + if (hasText()) { + result = result && getText() + .equals(other.getText()); + } + result = result && (hasVerb() == other.hasVerb()); + if (hasVerb()) { + result = result && getVerb() + .equals(other.getVerb()); + } + result = result && (hasBody() == other.hasBody()); + if (hasBody()) { + result = result && getBody() + .equals(other.getBody()); + } + result = result && (hasTime() == other.hasTime()); + if (hasTime()) { + result = result && (getTime() + == other.getTime()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + if (hasVerb()) { + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + } + if (hasBody()) { + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + } + if (hasTime()) { + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getTime()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.PingInformationProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.PingInformationProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.PingInformationProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.PingInformationProto} + * + *
+     *
+     * see org.apache.slider.api.types.PingInformation
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.PingInformationProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_PingInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_PingInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.PingInformationProto.class, org.apache.slider.api.proto.Messages.PingInformationProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.PingInformationProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + text_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + verb_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + body_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + time_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_PingInformationProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.PingInformationProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.PingInformationProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.PingInformationProto build() { + org.apache.slider.api.proto.Messages.PingInformationProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.PingInformationProto buildPartial() { + org.apache.slider.api.proto.Messages.PingInformationProto result = new org.apache.slider.api.proto.Messages.PingInformationProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.text_ = text_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.verb_ = verb_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.body_ = body_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.time_ = time_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.PingInformationProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.PingInformationProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.PingInformationProto other) { + if (other == org.apache.slider.api.proto.Messages.PingInformationProto.getDefaultInstance()) return this; + if (other.hasText()) { + bitField0_ |= 0x00000001; + text_ = other.text_; + onChanged(); + } + if (other.hasVerb()) { + bitField0_ |= 0x00000002; + verb_ = other.verb_; + onChanged(); + } + if (other.hasBody()) { + bitField0_ |= 0x00000004; + body_ = other.body_; + onChanged(); + } + if (other.hasTime()) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.PingInformationProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.PingInformationProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string text = 1; + private java.lang.Object text_ = ""; + /** + * optional string text = 1; + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string text = 1; + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string text = 1; + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string text = 1; + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + text_ = value; + onChanged(); + return this; + } + /** + * optional string text = 1; + */ + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000001); + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + * optional string text = 1; + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + text_ = value; + onChanged(); + return this; + } + + // optional string verb = 2; + private java.lang.Object verb_ = ""; + /** + * optional string verb = 2; + */ + public boolean hasVerb() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string verb = 2; + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string verb = 2; + */ + public com.google.protobuf.ByteString + getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string verb = 2; + */ + public Builder setVerb( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + verb_ = value; + onChanged(); + return this; + } + /** + * optional string verb = 2; + */ + public Builder clearVerb() { + bitField0_ = (bitField0_ & ~0x00000002); + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * optional string verb = 2; + */ + public Builder setVerbBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + verb_ = value; + onChanged(); + return this; + } + + // optional string body = 3; + private java.lang.Object body_ = ""; + /** + * optional string body = 3; + */ + public boolean hasBody() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string body = 3; + */ + public java.lang.String getBody() { + java.lang.Object ref = body_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + body_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string body = 3; + */ + public com.google.protobuf.ByteString + getBodyBytes() { + java.lang.Object ref = body_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + body_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string body = 3; + */ + public Builder setBody( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + body_ = value; + onChanged(); + return this; + } + /** + * optional string body = 3; + */ + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000004); + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + /** + * optional string body = 3; + */ + public Builder setBodyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + body_ = value; + onChanged(); + return this; + } + + // optional int64 time = 4; + private long time_ ; + /** + * optional int64 time = 4; + */ + public boolean hasTime() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int64 time = 4; + */ + public long getTime() { + return time_; + } + /** + * optional int64 time = 4; + */ + public Builder setTime(long value) { + bitField0_ |= 0x00000008; + time_ = value; + onChanged(); + return this; + } + /** + * optional int64 time = 4; + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000008); + time_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.PingInformationProto) + } + + static { + defaultInstance = new PingInformationProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.PingInformationProto) + } + + public interface NodeEntryInformationProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required int32 priority = 1; + /** + * required int32 priority = 1; + */ + boolean hasPriority(); + /** + * required int32 priority = 1; + */ + int getPriority(); + + // required int32 requested = 2; + /** + * required int32 requested = 2; + */ + boolean hasRequested(); + /** + * required int32 requested = 2; + */ + int getRequested(); + + // required int32 starting = 3; + /** + * required int32 starting = 3; + */ + boolean hasStarting(); + /** + * required int32 starting = 3; + */ + int getStarting(); + + // required int32 startFailed = 4; + /** + * required int32 startFailed = 4; + */ + boolean hasStartFailed(); + /** + * required int32 startFailed = 4; + */ + int getStartFailed(); + + // required int32 failed = 5; + /** + * required int32 failed = 5; + */ + boolean hasFailed(); + /** + * required int32 failed = 5; + */ + int getFailed(); + + // required int32 failedRecently = 6; + /** + * required int32 failedRecently = 6; + */ + boolean hasFailedRecently(); + /** + * required int32 failedRecently = 6; + */ + int getFailedRecently(); + + // required int32 preempted = 7; + /** + * required int32 preempted = 7; + */ + boolean hasPreempted(); + /** + * required int32 preempted = 7; + */ + int getPreempted(); + + // required int32 live = 8; + /** + * required int32 live = 8; + */ + boolean hasLive(); + /** + * required int32 live = 8; + */ + int getLive(); + + // required int32 releasing = 9; + /** + * required int32 releasing = 9; + */ + boolean hasReleasing(); + /** + * required int32 releasing = 9; + */ + int getReleasing(); + + // required int64 lastUsed = 10; + /** + * required int64 lastUsed = 10; + */ + boolean hasLastUsed(); + /** + * required int64 lastUsed = 10; + */ + long getLastUsed(); + + // required string name = 11; + /** + * required string name = 11; + */ + boolean hasName(); + /** + * required string name = 11; + */ + java.lang.String getName(); + /** + * required string name = 11; + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.NodeEntryInformationProto} + */ + public static final class NodeEntryInformationProto extends + com.google.protobuf.GeneratedMessage + implements NodeEntryInformationProtoOrBuilder { + // Use NodeEntryInformationProto.newBuilder() to construct. + private NodeEntryInformationProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private NodeEntryInformationProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final NodeEntryInformationProto defaultInstance; + public static NodeEntryInformationProto getDefaultInstance() { + return defaultInstance; + } + + public NodeEntryInformationProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NodeEntryInformationProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + priority_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + requested_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + starting_ = input.readInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + startFailed_ = input.readInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + failed_ = input.readInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + failedRecently_ = input.readInt32(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + preempted_ = input.readInt32(); + break; + } + case 64: { + bitField0_ |= 0x00000080; + live_ = input.readInt32(); + break; + } + case 72: { + bitField0_ |= 0x00000100; + releasing_ = input.readInt32(); + break; + } + case 80: { + bitField0_ |= 0x00000200; + lastUsed_ = input.readInt64(); + break; + } + case 90: { + bitField0_ |= 0x00000400; + name_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeEntryInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeEntryInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.NodeEntryInformationProto.class, org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public NodeEntryInformationProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeEntryInformationProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required int32 priority = 1; + public static final int PRIORITY_FIELD_NUMBER = 1; + private int priority_; + /** + * required int32 priority = 1; + */ + public boolean hasPriority() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required int32 priority = 1; + */ + public int getPriority() { + return priority_; + } + + // required int32 requested = 2; + public static final int REQUESTED_FIELD_NUMBER = 2; + private int requested_; + /** + * required int32 requested = 2; + */ + public boolean hasRequested() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int32 requested = 2; + */ + public int getRequested() { + return requested_; + } + + // required int32 starting = 3; + public static final int STARTING_FIELD_NUMBER = 3; + private int starting_; + /** + * required int32 starting = 3; + */ + public boolean hasStarting() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int32 starting = 3; + */ + public int getStarting() { + return starting_; + } + + // required int32 startFailed = 4; + public static final int STARTFAILED_FIELD_NUMBER = 4; + private int startFailed_; + /** + * required int32 startFailed = 4; + */ + public boolean hasStartFailed() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required int32 startFailed = 4; + */ + public int getStartFailed() { + return startFailed_; + } + + // required int32 failed = 5; + public static final int FAILED_FIELD_NUMBER = 5; + private int failed_; + /** + * required int32 failed = 5; + */ + public boolean hasFailed() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * required int32 failed = 5; + */ + public int getFailed() { + return failed_; + } + + // required int32 failedRecently = 6; + public static final int FAILEDRECENTLY_FIELD_NUMBER = 6; + private int failedRecently_; + /** + * required int32 failedRecently = 6; + */ + public boolean hasFailedRecently() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * required int32 failedRecently = 6; + */ + public int getFailedRecently() { + return failedRecently_; + } + + // required int32 preempted = 7; + public static final int PREEMPTED_FIELD_NUMBER = 7; + private int preempted_; + /** + * required int32 preempted = 7; + */ + public boolean hasPreempted() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * required int32 preempted = 7; + */ + public int getPreempted() { + return preempted_; + } + + // required int32 live = 8; + public static final int LIVE_FIELD_NUMBER = 8; + private int live_; + /** + * required int32 live = 8; + */ + public boolean hasLive() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * required int32 live = 8; + */ + public int getLive() { + return live_; + } + + // required int32 releasing = 9; + public static final int RELEASING_FIELD_NUMBER = 9; + private int releasing_; + /** + * required int32 releasing = 9; + */ + public boolean hasReleasing() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * required int32 releasing = 9; + */ + public int getReleasing() { + return releasing_; + } + + // required int64 lastUsed = 10; + public static final int LASTUSED_FIELD_NUMBER = 10; + private long lastUsed_; + /** + * required int64 lastUsed = 10; + */ + public boolean hasLastUsed() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * required int64 lastUsed = 10; + */ + public long getLastUsed() { + return lastUsed_; + } + + // required string name = 11; + public static final int NAME_FIELD_NUMBER = 11; + private java.lang.Object name_; + /** + * required string name = 11; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * required string name = 11; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * required string name = 11; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + priority_ = 0; + requested_ = 0; + starting_ = 0; + startFailed_ = 0; + failed_ = 0; + failedRecently_ = 0; + preempted_ = 0; + live_ = 0; + releasing_ = 0; + lastUsed_ = 0L; + name_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasPriority()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRequested()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasStarting()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasStartFailed()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasFailed()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasFailedRecently()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPreempted()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasLive()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasReleasing()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasLastUsed()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, priority_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, requested_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, starting_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(4, startFailed_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, failed_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(6, failedRecently_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeInt32(7, preempted_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeInt32(8, live_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeInt32(9, releasing_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeInt64(10, lastUsed_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBytes(11, getNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, priority_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, requested_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, starting_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, startFailed_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, failed_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, failedRecently_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, preempted_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, live_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, releasing_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, lastUsed_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.NodeEntryInformationProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.NodeEntryInformationProto other = (org.apache.slider.api.proto.Messages.NodeEntryInformationProto) obj; + + boolean result = true; + result = result && (hasPriority() == other.hasPriority()); + if (hasPriority()) { + result = result && (getPriority() + == other.getPriority()); + } + result = result && (hasRequested() == other.hasRequested()); + if (hasRequested()) { + result = result && (getRequested() + == other.getRequested()); + } + result = result && (hasStarting() == other.hasStarting()); + if (hasStarting()) { + result = result && (getStarting() + == other.getStarting()); + } + result = result && (hasStartFailed() == other.hasStartFailed()); + if (hasStartFailed()) { + result = result && (getStartFailed() + == other.getStartFailed()); + } + result = result && (hasFailed() == other.hasFailed()); + if (hasFailed()) { + result = result && (getFailed() + == other.getFailed()); + } + result = result && (hasFailedRecently() == other.hasFailedRecently()); + if (hasFailedRecently()) { + result = result && (getFailedRecently() + == other.getFailedRecently()); + } + result = result && (hasPreempted() == other.hasPreempted()); + if (hasPreempted()) { + result = result && (getPreempted() + == other.getPreempted()); + } + result = result && (hasLive() == other.hasLive()); + if (hasLive()) { + result = result && (getLive() + == other.getLive()); + } + result = result && (hasReleasing() == other.hasReleasing()); + if (hasReleasing()) { + result = result && (getReleasing() + == other.getReleasing()); + } + result = result && (hasLastUsed() == other.hasLastUsed()); + if (hasLastUsed()) { + result = result && (getLastUsed() + == other.getLastUsed()); + } + result = result && (hasName() == other.hasName()); + if (hasName()) { + result = result && getName() + .equals(other.getName()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasPriority()) { + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + } + if (hasRequested()) { + hash = (37 * hash) + REQUESTED_FIELD_NUMBER; + hash = (53 * hash) + getRequested(); + } + if (hasStarting()) { + hash = (37 * hash) + STARTING_FIELD_NUMBER; + hash = (53 * hash) + getStarting(); + } + if (hasStartFailed()) { + hash = (37 * hash) + STARTFAILED_FIELD_NUMBER; + hash = (53 * hash) + getStartFailed(); + } + if (hasFailed()) { + hash = (37 * hash) + FAILED_FIELD_NUMBER; + hash = (53 * hash) + getFailed(); + } + if (hasFailedRecently()) { + hash = (37 * hash) + FAILEDRECENTLY_FIELD_NUMBER; + hash = (53 * hash) + getFailedRecently(); + } + if (hasPreempted()) { + hash = (37 * hash) + PREEMPTED_FIELD_NUMBER; + hash = (53 * hash) + getPreempted(); + } + if (hasLive()) { + hash = (37 * hash) + LIVE_FIELD_NUMBER; + hash = (53 * hash) + getLive(); + } + if (hasReleasing()) { + hash = (37 * hash) + RELEASING_FIELD_NUMBER; + hash = (53 * hash) + getReleasing(); + } + if (hasLastUsed()) { + hash = (37 * hash) + LASTUSED_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getLastUsed()); + } + if (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.NodeEntryInformationProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.NodeEntryInformationProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.NodeEntryInformationProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.NodeEntryInformationProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeEntryInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeEntryInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.NodeEntryInformationProto.class, org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.NodeEntryInformationProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + priority_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + requested_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + starting_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + startFailed_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + failed_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + failedRecently_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + preempted_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + live_ = 0; + bitField0_ = (bitField0_ & ~0x00000080); + releasing_ = 0; + bitField0_ = (bitField0_ & ~0x00000100); + lastUsed_ = 0L; + bitField0_ = (bitField0_ & ~0x00000200); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeEntryInformationProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.NodeEntryInformationProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.NodeEntryInformationProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.NodeEntryInformationProto build() { + org.apache.slider.api.proto.Messages.NodeEntryInformationProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.NodeEntryInformationProto buildPartial() { + org.apache.slider.api.proto.Messages.NodeEntryInformationProto result = new org.apache.slider.api.proto.Messages.NodeEntryInformationProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.priority_ = priority_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.requested_ = requested_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.starting_ = starting_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.startFailed_ = startFailed_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.failed_ = failed_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.failedRecently_ = failedRecently_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.preempted_ = preempted_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.live_ = live_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.releasing_ = releasing_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.lastUsed_ = lastUsed_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.name_ = name_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.NodeEntryInformationProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.NodeEntryInformationProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.NodeEntryInformationProto other) { + if (other == org.apache.slider.api.proto.Messages.NodeEntryInformationProto.getDefaultInstance()) return this; + if (other.hasPriority()) { + setPriority(other.getPriority()); + } + if (other.hasRequested()) { + setRequested(other.getRequested()); + } + if (other.hasStarting()) { + setStarting(other.getStarting()); + } + if (other.hasStartFailed()) { + setStartFailed(other.getStartFailed()); + } + if (other.hasFailed()) { + setFailed(other.getFailed()); + } + if (other.hasFailedRecently()) { + setFailedRecently(other.getFailedRecently()); + } + if (other.hasPreempted()) { + setPreempted(other.getPreempted()); + } + if (other.hasLive()) { + setLive(other.getLive()); + } + if (other.hasReleasing()) { + setReleasing(other.getReleasing()); + } + if (other.hasLastUsed()) { + setLastUsed(other.getLastUsed()); + } + if (other.hasName()) { + bitField0_ |= 0x00000400; + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasPriority()) { + + return false; + } + if (!hasRequested()) { + + return false; + } + if (!hasStarting()) { + + return false; + } + if (!hasStartFailed()) { + + return false; + } + if (!hasFailed()) { + + return false; + } + if (!hasFailedRecently()) { + + return false; + } + if (!hasPreempted()) { + + return false; + } + if (!hasLive()) { + + return false; + } + if (!hasReleasing()) { + + return false; + } + if (!hasLastUsed()) { + + return false; + } + if (!hasName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.NodeEntryInformationProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.NodeEntryInformationProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required int32 priority = 1; + private int priority_ ; + /** + * required int32 priority = 1; + */ + public boolean hasPriority() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required int32 priority = 1; + */ + public int getPriority() { + return priority_; + } + /** + * required int32 priority = 1; + */ + public Builder setPriority(int value) { + bitField0_ |= 0x00000001; + priority_ = value; + onChanged(); + return this; + } + /** + * required int32 priority = 1; + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000001); + priority_ = 0; + onChanged(); + return this; + } + + // required int32 requested = 2; + private int requested_ ; + /** + * required int32 requested = 2; + */ + public boolean hasRequested() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int32 requested = 2; + */ + public int getRequested() { + return requested_; + } + /** + * required int32 requested = 2; + */ + public Builder setRequested(int value) { + bitField0_ |= 0x00000002; + requested_ = value; + onChanged(); + return this; + } + /** + * required int32 requested = 2; + */ + public Builder clearRequested() { + bitField0_ = (bitField0_ & ~0x00000002); + requested_ = 0; + onChanged(); + return this; + } + + // required int32 starting = 3; + private int starting_ ; + /** + * required int32 starting = 3; + */ + public boolean hasStarting() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int32 starting = 3; + */ + public int getStarting() { + return starting_; + } + /** + * required int32 starting = 3; + */ + public Builder setStarting(int value) { + bitField0_ |= 0x00000004; + starting_ = value; + onChanged(); + return this; + } + /** + * required int32 starting = 3; + */ + public Builder clearStarting() { + bitField0_ = (bitField0_ & ~0x00000004); + starting_ = 0; + onChanged(); + return this; + } + + // required int32 startFailed = 4; + private int startFailed_ ; + /** + * required int32 startFailed = 4; + */ + public boolean hasStartFailed() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required int32 startFailed = 4; + */ + public int getStartFailed() { + return startFailed_; + } + /** + * required int32 startFailed = 4; + */ + public Builder setStartFailed(int value) { + bitField0_ |= 0x00000008; + startFailed_ = value; + onChanged(); + return this; + } + /** + * required int32 startFailed = 4; + */ + public Builder clearStartFailed() { + bitField0_ = (bitField0_ & ~0x00000008); + startFailed_ = 0; + onChanged(); + return this; + } + + // required int32 failed = 5; + private int failed_ ; + /** + * required int32 failed = 5; + */ + public boolean hasFailed() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * required int32 failed = 5; + */ + public int getFailed() { + return failed_; + } + /** + * required int32 failed = 5; + */ + public Builder setFailed(int value) { + bitField0_ |= 0x00000010; + failed_ = value; + onChanged(); + return this; + } + /** + * required int32 failed = 5; + */ + public Builder clearFailed() { + bitField0_ = (bitField0_ & ~0x00000010); + failed_ = 0; + onChanged(); + return this; + } + + // required int32 failedRecently = 6; + private int failedRecently_ ; + /** + * required int32 failedRecently = 6; + */ + public boolean hasFailedRecently() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * required int32 failedRecently = 6; + */ + public int getFailedRecently() { + return failedRecently_; + } + /** + * required int32 failedRecently = 6; + */ + public Builder setFailedRecently(int value) { + bitField0_ |= 0x00000020; + failedRecently_ = value; + onChanged(); + return this; + } + /** + * required int32 failedRecently = 6; + */ + public Builder clearFailedRecently() { + bitField0_ = (bitField0_ & ~0x00000020); + failedRecently_ = 0; + onChanged(); + return this; + } + + // required int32 preempted = 7; + private int preempted_ ; + /** + * required int32 preempted = 7; + */ + public boolean hasPreempted() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * required int32 preempted = 7; + */ + public int getPreempted() { + return preempted_; + } + /** + * required int32 preempted = 7; + */ + public Builder setPreempted(int value) { + bitField0_ |= 0x00000040; + preempted_ = value; + onChanged(); + return this; + } + /** + * required int32 preempted = 7; + */ + public Builder clearPreempted() { + bitField0_ = (bitField0_ & ~0x00000040); + preempted_ = 0; + onChanged(); + return this; + } + + // required int32 live = 8; + private int live_ ; + /** + * required int32 live = 8; + */ + public boolean hasLive() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * required int32 live = 8; + */ + public int getLive() { + return live_; + } + /** + * required int32 live = 8; + */ + public Builder setLive(int value) { + bitField0_ |= 0x00000080; + live_ = value; + onChanged(); + return this; + } + /** + * required int32 live = 8; + */ + public Builder clearLive() { + bitField0_ = (bitField0_ & ~0x00000080); + live_ = 0; + onChanged(); + return this; + } + + // required int32 releasing = 9; + private int releasing_ ; + /** + * required int32 releasing = 9; + */ + public boolean hasReleasing() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * required int32 releasing = 9; + */ + public int getReleasing() { + return releasing_; + } + /** + * required int32 releasing = 9; + */ + public Builder setReleasing(int value) { + bitField0_ |= 0x00000100; + releasing_ = value; + onChanged(); + return this; + } + /** + * required int32 releasing = 9; + */ + public Builder clearReleasing() { + bitField0_ = (bitField0_ & ~0x00000100); + releasing_ = 0; + onChanged(); + return this; + } + + // required int64 lastUsed = 10; + private long lastUsed_ ; + /** + * required int64 lastUsed = 10; + */ + public boolean hasLastUsed() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * required int64 lastUsed = 10; + */ + public long getLastUsed() { + return lastUsed_; + } + /** + * required int64 lastUsed = 10; + */ + public Builder setLastUsed(long value) { + bitField0_ |= 0x00000200; + lastUsed_ = value; + onChanged(); + return this; + } + /** + * required int64 lastUsed = 10; + */ + public Builder clearLastUsed() { + bitField0_ = (bitField0_ & ~0x00000200); + lastUsed_ = 0L; + onChanged(); + return this; + } + + // required string name = 11; + private java.lang.Object name_ = ""; + /** + * required string name = 11; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * required string name = 11; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string name = 11; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string name = 11; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + name_ = value; + onChanged(); + return this; + } + /** + * required string name = 11; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000400); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * required string name = 11; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + name_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.NodeEntryInformationProto) + } + + static { + defaultInstance = new NodeEntryInformationProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.NodeEntryInformationProto) + } + + public interface NodeInformationProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string hostname = 1; + /** + * required string hostname = 1; + */ + boolean hasHostname(); + /** + * required string hostname = 1; + */ + java.lang.String getHostname(); + /** + * required string hostname = 1; + */ + com.google.protobuf.ByteString + getHostnameBytes(); + + // required string state = 2; + /** + * required string state = 2; + */ + boolean hasState(); + /** + * required string state = 2; + */ + java.lang.String getState(); + /** + * required string state = 2; + */ + com.google.protobuf.ByteString + getStateBytes(); + + // required string httpAddress = 3; + /** + * required string httpAddress = 3; + */ + boolean hasHttpAddress(); + /** + * required string httpAddress = 3; + */ + java.lang.String getHttpAddress(); + /** + * required string httpAddress = 3; + */ + com.google.protobuf.ByteString + getHttpAddressBytes(); + + // required string rackName = 4; + /** + * required string rackName = 4; + */ + boolean hasRackName(); + /** + * required string rackName = 4; + */ + java.lang.String getRackName(); + /** + * required string rackName = 4; + */ + com.google.protobuf.ByteString + getRackNameBytes(); + + // required string labels = 5; + /** + * required string labels = 5; + */ + boolean hasLabels(); + /** + * required string labels = 5; + */ + java.lang.String getLabels(); + /** + * required string labels = 5; + */ + com.google.protobuf.ByteString + getLabelsBytes(); + + // required string healthReport = 6; + /** + * required string healthReport = 6; + */ + boolean hasHealthReport(); + /** + * required string healthReport = 6; + */ + java.lang.String getHealthReport(); + /** + * required string healthReport = 6; + */ + com.google.protobuf.ByteString + getHealthReportBytes(); + + // required int64 lastUpdated = 7; + /** + * required int64 lastUpdated = 7; + */ + boolean hasLastUpdated(); + /** + * required int64 lastUpdated = 7; + */ + long getLastUpdated(); + + // repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + java.util.List + getEntriesList(); + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + org.apache.slider.api.proto.Messages.NodeEntryInformationProto getEntries(int index); + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + int getEntriesCount(); + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + org.apache.slider.api.proto.Messages.NodeEntryInformationProtoOrBuilder getEntriesOrBuilder( + int index); + } + /** + * Protobuf type {@code org.apache.slider.api.NodeInformationProto} + */ + public static final class NodeInformationProto extends + com.google.protobuf.GeneratedMessage + implements NodeInformationProtoOrBuilder { + // Use NodeInformationProto.newBuilder() to construct. + private NodeInformationProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private NodeInformationProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final NodeInformationProto defaultInstance; + public static NodeInformationProto getDefaultInstance() { + return defaultInstance; + } + + public NodeInformationProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NodeInformationProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + hostname_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + state_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + httpAddress_ = input.readBytes(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + rackName_ = input.readBytes(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + labels_ = input.readBytes(); + break; + } + case 50: { + bitField0_ |= 0x00000020; + healthReport_ = input.readBytes(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + lastUpdated_ = input.readInt64(); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + entries_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000080; + } + entries_.add(input.readMessage(org.apache.slider.api.proto.Messages.NodeEntryInformationProto.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.NodeInformationProto.class, org.apache.slider.api.proto.Messages.NodeInformationProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public NodeInformationProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeInformationProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string hostname = 1; + public static final int HOSTNAME_FIELD_NUMBER = 1; + private java.lang.Object hostname_; + /** + * required string hostname = 1; + */ + public boolean hasHostname() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string hostname = 1; + */ + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + hostname_ = s; + } + return s; + } + } + /** + * required string hostname = 1; + */ + public com.google.protobuf.ByteString + getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string state = 2; + public static final int STATE_FIELD_NUMBER = 2; + private java.lang.Object state_; + /** + * required string state = 2; + */ + public boolean hasState() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string state = 2; + */ + public java.lang.String getState() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + state_ = s; + } + return s; + } + } + /** + * required string state = 2; + */ + public com.google.protobuf.ByteString + getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string httpAddress = 3; + public static final int HTTPADDRESS_FIELD_NUMBER = 3; + private java.lang.Object httpAddress_; + /** + * required string httpAddress = 3; + */ + public boolean hasHttpAddress() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required string httpAddress = 3; + */ + public java.lang.String getHttpAddress() { + java.lang.Object ref = httpAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + httpAddress_ = s; + } + return s; + } + } + /** + * required string httpAddress = 3; + */ + public com.google.protobuf.ByteString + getHttpAddressBytes() { + java.lang.Object ref = httpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + httpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string rackName = 4; + public static final int RACKNAME_FIELD_NUMBER = 4; + private java.lang.Object rackName_; + /** + * required string rackName = 4; + */ + public boolean hasRackName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required string rackName = 4; + */ + public java.lang.String getRackName() { + java.lang.Object ref = rackName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + rackName_ = s; + } + return s; + } + } + /** + * required string rackName = 4; + */ + public com.google.protobuf.ByteString + getRackNameBytes() { + java.lang.Object ref = rackName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rackName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string labels = 5; + public static final int LABELS_FIELD_NUMBER = 5; + private java.lang.Object labels_; + /** + * required string labels = 5; + */ + public boolean hasLabels() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * required string labels = 5; + */ + public java.lang.String getLabels() { + java.lang.Object ref = labels_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + labels_ = s; + } + return s; + } + } + /** + * required string labels = 5; + */ + public com.google.protobuf.ByteString + getLabelsBytes() { + java.lang.Object ref = labels_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + labels_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string healthReport = 6; + public static final int HEALTHREPORT_FIELD_NUMBER = 6; + private java.lang.Object healthReport_; + /** + * required string healthReport = 6; + */ + public boolean hasHealthReport() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * required string healthReport = 6; + */ + public java.lang.String getHealthReport() { + java.lang.Object ref = healthReport_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + healthReport_ = s; + } + return s; + } + } + /** + * required string healthReport = 6; + */ + public com.google.protobuf.ByteString + getHealthReportBytes() { + java.lang.Object ref = healthReport_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + healthReport_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required int64 lastUpdated = 7; + public static final int LASTUPDATED_FIELD_NUMBER = 7; + private long lastUpdated_; + /** + * required int64 lastUpdated = 7; + */ + public boolean hasLastUpdated() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * required int64 lastUpdated = 7; + */ + public long getLastUpdated() { + return lastUpdated_; + } + + // repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + public static final int ENTRIES_FIELD_NUMBER = 8; + private java.util.List entries_; + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public java.util.List getEntriesList() { + return entries_; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public int getEntriesCount() { + return entries_.size(); + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public org.apache.slider.api.proto.Messages.NodeEntryInformationProto getEntries(int index) { + return entries_.get(index); + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public org.apache.slider.api.proto.Messages.NodeEntryInformationProtoOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + + private void initFields() { + hostname_ = ""; + state_ = ""; + httpAddress_ = ""; + rackName_ = ""; + labels_ = ""; + healthReport_ = ""; + lastUpdated_ = 0L; + entries_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasHostname()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasState()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasHttpAddress()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRackName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasLabels()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasHealthReport()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasLastUpdated()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getEntriesCount(); i++) { + if (!getEntries(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getHostnameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getStateBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getHttpAddressBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getRackNameBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getLabelsBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, getHealthReportBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeInt64(7, lastUpdated_); + } + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(8, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getHostnameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getStateBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getHttpAddressBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getRackNameBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getLabelsBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, getHealthReportBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, lastUpdated_); + } + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, entries_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.NodeInformationProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.NodeInformationProto other = (org.apache.slider.api.proto.Messages.NodeInformationProto) obj; + + boolean result = true; + result = result && (hasHostname() == other.hasHostname()); + if (hasHostname()) { + result = result && getHostname() + .equals(other.getHostname()); + } + result = result && (hasState() == other.hasState()); + if (hasState()) { + result = result && getState() + .equals(other.getState()); + } + result = result && (hasHttpAddress() == other.hasHttpAddress()); + if (hasHttpAddress()) { + result = result && getHttpAddress() + .equals(other.getHttpAddress()); + } + result = result && (hasRackName() == other.hasRackName()); + if (hasRackName()) { + result = result && getRackName() + .equals(other.getRackName()); + } + result = result && (hasLabels() == other.hasLabels()); + if (hasLabels()) { + result = result && getLabels() + .equals(other.getLabels()); + } + result = result && (hasHealthReport() == other.hasHealthReport()); + if (hasHealthReport()) { + result = result && getHealthReport() + .equals(other.getHealthReport()); + } + result = result && (hasLastUpdated() == other.hasLastUpdated()); + if (hasLastUpdated()) { + result = result && (getLastUpdated() + == other.getLastUpdated()); + } + result = result && getEntriesList() + .equals(other.getEntriesList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasHostname()) { + hash = (37 * hash) + HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getHostname().hashCode(); + } + if (hasState()) { + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + } + if (hasHttpAddress()) { + hash = (37 * hash) + HTTPADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getHttpAddress().hashCode(); + } + if (hasRackName()) { + hash = (37 * hash) + RACKNAME_FIELD_NUMBER; + hash = (53 * hash) + getRackName().hashCode(); + } + if (hasLabels()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabels().hashCode(); + } + if (hasHealthReport()) { + hash = (37 * hash) + HEALTHREPORT_FIELD_NUMBER; + hash = (53 * hash) + getHealthReport().hashCode(); + } + if (hasLastUpdated()) { + hash = (37 * hash) + LASTUPDATED_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getLastUpdated()); + } + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.NodeInformationProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.NodeInformationProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.NodeInformationProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.NodeInformationProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeInformationProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeInformationProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.NodeInformationProto.class, org.apache.slider.api.proto.Messages.NodeInformationProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.NodeInformationProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getEntriesFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + hostname_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + state_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + httpAddress_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + rackName_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + labels_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + healthReport_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + lastUpdated_ = 0L; + bitField0_ = (bitField0_ & ~0x00000040); + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + } else { + entriesBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_NodeInformationProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.NodeInformationProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.NodeInformationProto build() { + org.apache.slider.api.proto.Messages.NodeInformationProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.NodeInformationProto buildPartial() { + org.apache.slider.api.proto.Messages.NodeInformationProto result = new org.apache.slider.api.proto.Messages.NodeInformationProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.hostname_ = hostname_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.state_ = state_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.httpAddress_ = httpAddress_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.rackName_ = rackName_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.labels_ = labels_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.healthReport_ = healthReport_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.lastUpdated_ = lastUpdated_; + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.NodeInformationProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.NodeInformationProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.NodeInformationProto other) { + if (other == org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance()) return this; + if (other.hasHostname()) { + bitField0_ |= 0x00000001; + hostname_ = other.hostname_; + onChanged(); + } + if (other.hasState()) { + bitField0_ |= 0x00000002; + state_ = other.state_; + onChanged(); + } + if (other.hasHttpAddress()) { + bitField0_ |= 0x00000004; + httpAddress_ = other.httpAddress_; + onChanged(); + } + if (other.hasRackName()) { + bitField0_ |= 0x00000008; + rackName_ = other.rackName_; + onChanged(); + } + if (other.hasLabels()) { + bitField0_ |= 0x00000010; + labels_ = other.labels_; + onChanged(); + } + if (other.hasHealthReport()) { + bitField0_ |= 0x00000020; + healthReport_ = other.healthReport_; + onChanged(); + } + if (other.hasLastUpdated()) { + setLastUpdated(other.getLastUpdated()); + } + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000080); + entriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEntriesFieldBuilder() : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasHostname()) { + + return false; + } + if (!hasState()) { + + return false; + } + if (!hasHttpAddress()) { + + return false; + } + if (!hasRackName()) { + + return false; + } + if (!hasLabels()) { + + return false; + } + if (!hasHealthReport()) { + + return false; + } + if (!hasLastUpdated()) { + + return false; + } + for (int i = 0; i < getEntriesCount(); i++) { + if (!getEntries(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.NodeInformationProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.NodeInformationProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string hostname = 1; + private java.lang.Object hostname_ = ""; + /** + * required string hostname = 1; + */ + public boolean hasHostname() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string hostname = 1; + */ + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + hostname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string hostname = 1; + */ + public com.google.protobuf.ByteString + getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string hostname = 1; + */ + public Builder setHostname( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + hostname_ = value; + onChanged(); + return this; + } + /** + * required string hostname = 1; + */ + public Builder clearHostname() { + bitField0_ = (bitField0_ & ~0x00000001); + hostname_ = getDefaultInstance().getHostname(); + onChanged(); + return this; + } + /** + * required string hostname = 1; + */ + public Builder setHostnameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + hostname_ = value; + onChanged(); + return this; + } + + // required string state = 2; + private java.lang.Object state_ = ""; + /** + * required string state = 2; + */ + public boolean hasState() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string state = 2; + */ + public java.lang.String getState() { + java.lang.Object ref = state_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + state_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string state = 2; + */ + public com.google.protobuf.ByteString + getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string state = 2; + */ + public Builder setState( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value; + onChanged(); + return this; + } + /** + * required string state = 2; + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = getDefaultInstance().getState(); + onChanged(); + return this; + } + /** + * required string state = 2; + */ + public Builder setStateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value; + onChanged(); + return this; + } + + // required string httpAddress = 3; + private java.lang.Object httpAddress_ = ""; + /** + * required string httpAddress = 3; + */ + public boolean hasHttpAddress() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required string httpAddress = 3; + */ + public java.lang.String getHttpAddress() { + java.lang.Object ref = httpAddress_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + httpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string httpAddress = 3; + */ + public com.google.protobuf.ByteString + getHttpAddressBytes() { + java.lang.Object ref = httpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + httpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string httpAddress = 3; + */ + public Builder setHttpAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + httpAddress_ = value; + onChanged(); + return this; + } + /** + * required string httpAddress = 3; + */ + public Builder clearHttpAddress() { + bitField0_ = (bitField0_ & ~0x00000004); + httpAddress_ = getDefaultInstance().getHttpAddress(); + onChanged(); + return this; + } + /** + * required string httpAddress = 3; + */ + public Builder setHttpAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + httpAddress_ = value; + onChanged(); + return this; + } + + // required string rackName = 4; + private java.lang.Object rackName_ = ""; + /** + * required string rackName = 4; + */ + public boolean hasRackName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required string rackName = 4; + */ + public java.lang.String getRackName() { + java.lang.Object ref = rackName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + rackName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string rackName = 4; + */ + public com.google.protobuf.ByteString + getRackNameBytes() { + java.lang.Object ref = rackName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rackName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string rackName = 4; + */ + public Builder setRackName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + rackName_ = value; + onChanged(); + return this; + } + /** + * required string rackName = 4; + */ + public Builder clearRackName() { + bitField0_ = (bitField0_ & ~0x00000008); + rackName_ = getDefaultInstance().getRackName(); + onChanged(); + return this; + } + /** + * required string rackName = 4; + */ + public Builder setRackNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + rackName_ = value; + onChanged(); + return this; + } + + // required string labels = 5; + private java.lang.Object labels_ = ""; + /** + * required string labels = 5; + */ + public boolean hasLabels() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * required string labels = 5; + */ + public java.lang.String getLabels() { + java.lang.Object ref = labels_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + labels_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string labels = 5; + */ + public com.google.protobuf.ByteString + getLabelsBytes() { + java.lang.Object ref = labels_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + labels_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string labels = 5; + */ + public Builder setLabels( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + labels_ = value; + onChanged(); + return this; + } + /** + * required string labels = 5; + */ + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + labels_ = getDefaultInstance().getLabels(); + onChanged(); + return this; + } + /** + * required string labels = 5; + */ + public Builder setLabelsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + labels_ = value; + onChanged(); + return this; + } + + // required string healthReport = 6; + private java.lang.Object healthReport_ = ""; + /** + * required string healthReport = 6; + */ + public boolean hasHealthReport() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * required string healthReport = 6; + */ + public java.lang.String getHealthReport() { + java.lang.Object ref = healthReport_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + healthReport_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string healthReport = 6; + */ + public com.google.protobuf.ByteString + getHealthReportBytes() { + java.lang.Object ref = healthReport_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + healthReport_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string healthReport = 6; + */ + public Builder setHealthReport( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + healthReport_ = value; + onChanged(); + return this; + } + /** + * required string healthReport = 6; + */ + public Builder clearHealthReport() { + bitField0_ = (bitField0_ & ~0x00000020); + healthReport_ = getDefaultInstance().getHealthReport(); + onChanged(); + return this; + } + /** + * required string healthReport = 6; + */ + public Builder setHealthReportBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + healthReport_ = value; + onChanged(); + return this; + } + + // required int64 lastUpdated = 7; + private long lastUpdated_ ; + /** + * required int64 lastUpdated = 7; + */ + public boolean hasLastUpdated() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * required int64 lastUpdated = 7; + */ + public long getLastUpdated() { + return lastUpdated_; + } + /** + * required int64 lastUpdated = 7; + */ + public Builder setLastUpdated(long value) { + bitField0_ |= 0x00000040; + lastUpdated_ = value; + onChanged(); + return this; + } + /** + * required int64 lastUpdated = 7; + */ + public Builder clearLastUpdated() { + bitField0_ = (bitField0_ & ~0x00000040); + lastUpdated_ = 0L; + onChanged(); + return this; + } + + // repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + private java.util.List entries_ = + java.util.Collections.emptyList(); + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + entries_ = new java.util.ArrayList(entries_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.NodeEntryInformationProto, org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder, org.apache.slider.api.proto.Messages.NodeEntryInformationProtoOrBuilder> entriesBuilder_; + + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public org.apache.slider.api.proto.Messages.NodeEntryInformationProto getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder setEntries( + int index, org.apache.slider.api.proto.Messages.NodeEntryInformationProto value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder setEntries( + int index, org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder addEntries(org.apache.slider.api.proto.Messages.NodeEntryInformationProto value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder addEntries( + int index, org.apache.slider.api.proto.Messages.NodeEntryInformationProto value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder addEntries( + org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder addEntries( + int index, org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + super.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder getEntriesBuilder( + int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public org.apache.slider.api.proto.Messages.NodeEntryInformationProtoOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder addEntriesBuilder() { + return getEntriesFieldBuilder().addBuilder( + org.apache.slider.api.proto.Messages.NodeEntryInformationProto.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder addEntriesBuilder( + int index) { + return getEntriesFieldBuilder().addBuilder( + index, org.apache.slider.api.proto.Messages.NodeEntryInformationProto.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.NodeEntryInformationProto entries = 8; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.NodeEntryInformationProto, org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder, org.apache.slider.api.proto.Messages.NodeEntryInformationProtoOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.NodeEntryInformationProto, org.apache.slider.api.proto.Messages.NodeEntryInformationProto.Builder, org.apache.slider.api.proto.Messages.NodeEntryInformationProtoOrBuilder>( + entries_, + ((bitField0_ & 0x00000080) == 0x00000080), + getParentForChildren(), + isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.NodeInformationProto) + } + + static { + defaultInstance = new NodeInformationProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.NodeInformationProto) + } + + public interface GetModelRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelRequestProto} + */ + public static final class GetModelRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetModelRequestProtoOrBuilder { + // Use GetModelRequestProto.newBuilder() to construct. + private GetModelRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetModelRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetModelRequestProto defaultInstance; + public static GetModelRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetModelRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetModelRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelRequestProto.class, org.apache.slider.api.proto.Messages.GetModelRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetModelRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetModelRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetModelRequestProto other = (org.apache.slider.api.proto.Messages.GetModelRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetModelRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetModelRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelRequestProto.class, org.apache.slider.api.proto.Messages.GetModelRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetModelRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetModelRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetModelRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetModelRequestProto build() { + org.apache.slider.api.proto.Messages.GetModelRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetModelRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetModelRequestProto result = new org.apache.slider.api.proto.Messages.GetModelRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetModelRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetModelRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetModelRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetModelRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetModelRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetModelRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetModelRequestProto) + } + + static { + defaultInstance = new GetModelRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetModelRequestProto) + } + + public interface GetModelDesiredRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelDesiredRequestProto} + */ + public static final class GetModelDesiredRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetModelDesiredRequestProtoOrBuilder { + // Use GetModelDesiredRequestProto.newBuilder() to construct. + private GetModelDesiredRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetModelDesiredRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetModelDesiredRequestProto defaultInstance; + public static GetModelDesiredRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetModelDesiredRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetModelDesiredRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto.class, org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetModelDesiredRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelDesiredRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto other = (org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelDesiredRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetModelDesiredRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto.class, org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto build() { + org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto result = new org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetModelDesiredRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetModelDesiredRequestProto) + } + + static { + defaultInstance = new GetModelDesiredRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetModelDesiredRequestProto) + } + + public interface GetModelDesiredAppconfRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelDesiredAppconfRequestProto} + */ + public static final class GetModelDesiredAppconfRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetModelDesiredAppconfRequestProtoOrBuilder { + // Use GetModelDesiredAppconfRequestProto.newBuilder() to construct. + private GetModelDesiredAppconfRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetModelDesiredAppconfRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetModelDesiredAppconfRequestProto defaultInstance; + public static GetModelDesiredAppconfRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetModelDesiredAppconfRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetModelDesiredAppconfRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto.class, org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetModelDesiredAppconfRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelDesiredAppconfRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto other = (org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelDesiredAppconfRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto.class, org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto build() { + org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto result = new org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetModelDesiredAppconfRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetModelDesiredAppconfRequestProto) + } + + static { + defaultInstance = new GetModelDesiredAppconfRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetModelDesiredAppconfRequestProto) + } + + public interface GetModelDesiredResourcesRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelDesiredResourcesRequestProto} + */ + public static final class GetModelDesiredResourcesRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetModelDesiredResourcesRequestProtoOrBuilder { + // Use GetModelDesiredResourcesRequestProto.newBuilder() to construct. + private GetModelDesiredResourcesRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetModelDesiredResourcesRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetModelDesiredResourcesRequestProto defaultInstance; + public static GetModelDesiredResourcesRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetModelDesiredResourcesRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetModelDesiredResourcesRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto.class, org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetModelDesiredResourcesRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelDesiredResourcesRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto other = (org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelDesiredResourcesRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto.class, org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto build() { + org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto result = new org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetModelDesiredResourcesRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetModelDesiredResourcesRequestProto) + } + + static { + defaultInstance = new GetModelDesiredResourcesRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetModelDesiredResourcesRequestProto) + } + + public interface GetModelResolvedAppconfRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelResolvedAppconfRequestProto} + */ + public static final class GetModelResolvedAppconfRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetModelResolvedAppconfRequestProtoOrBuilder { + // Use GetModelResolvedAppconfRequestProto.newBuilder() to construct. + private GetModelResolvedAppconfRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetModelResolvedAppconfRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetModelResolvedAppconfRequestProto defaultInstance; + public static GetModelResolvedAppconfRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetModelResolvedAppconfRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetModelResolvedAppconfRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto.class, org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetModelResolvedAppconfRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelResolvedAppconfRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto other = (org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelResolvedAppconfRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto.class, org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto build() { + org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto result = new org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetModelResolvedAppconfRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetModelResolvedAppconfRequestProto) + } + + static { + defaultInstance = new GetModelResolvedAppconfRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetModelResolvedAppconfRequestProto) + } + + public interface GetModelResolvedResourcesRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelResolvedResourcesRequestProto} + */ + public static final class GetModelResolvedResourcesRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetModelResolvedResourcesRequestProtoOrBuilder { + // Use GetModelResolvedResourcesRequestProto.newBuilder() to construct. + private GetModelResolvedResourcesRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetModelResolvedResourcesRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetModelResolvedResourcesRequestProto defaultInstance; + public static GetModelResolvedResourcesRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetModelResolvedResourcesRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetModelResolvedResourcesRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto.class, org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetModelResolvedResourcesRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelResolvedResourcesRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto other = (org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelResolvedResourcesRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto.class, org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto build() { + org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto result = new org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetModelResolvedResourcesRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetModelResolvedResourcesRequestProto) + } + + static { + defaultInstance = new GetModelResolvedResourcesRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetModelResolvedResourcesRequestProto) + } + + public interface GetModelLiveResourcesRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelLiveResourcesRequestProto} + */ + public static final class GetModelLiveResourcesRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetModelLiveResourcesRequestProtoOrBuilder { + // Use GetModelLiveResourcesRequestProto.newBuilder() to construct. + private GetModelLiveResourcesRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetModelLiveResourcesRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetModelLiveResourcesRequestProto defaultInstance; + public static GetModelLiveResourcesRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetModelLiveResourcesRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetModelLiveResourcesRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto.class, org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetModelLiveResourcesRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetModelLiveResourcesRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto other = (org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetModelLiveResourcesRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto.class, org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto build() { + org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto result = new org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetModelLiveResourcesRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetModelLiveResourcesRequestProto) + } + + static { + defaultInstance = new GetModelLiveResourcesRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetModelLiveResourcesRequestProto) + } + + public interface GetLiveContainersRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveContainersRequestProto} + */ + public static final class GetLiveContainersRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveContainersRequestProtoOrBuilder { + // Use GetLiveContainersRequestProto.newBuilder() to construct. + private GetLiveContainersRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveContainersRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveContainersRequestProto defaultInstance; + public static GetLiveContainersRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveContainersRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveContainersRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveContainersRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveContainersRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto other = (org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveContainersRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveContainersRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto build() { + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto result = new org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveContainersRequestProto) + } + + static { + defaultInstance = new GetLiveContainersRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveContainersRequestProto) + } + + public interface GetLiveContainersResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated string names = 1; + /** + * repeated string names = 1; + */ + java.util.List + getNamesList(); + /** + * repeated string names = 1; + */ + int getNamesCount(); + /** + * repeated string names = 1; + */ + java.lang.String getNames(int index); + /** + * repeated string names = 1; + */ + com.google.protobuf.ByteString + getNamesBytes(int index); + + // repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + java.util.List + getContainersList(); + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + org.apache.slider.api.proto.Messages.ContainerInformationProto getContainers(int index); + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + int getContainersCount(); + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + java.util.List + getContainersOrBuilderList(); + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + org.apache.slider.api.proto.Messages.ContainerInformationProtoOrBuilder getContainersOrBuilder( + int index); + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveContainersResponseProto} + */ + public static final class GetLiveContainersResponseProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveContainersResponseProtoOrBuilder { + // Use GetLiveContainersResponseProto.newBuilder() to construct. + private GetLiveContainersResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveContainersResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveContainersResponseProto defaultInstance; + public static GetLiveContainersResponseProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveContainersResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveContainersResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + names_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + names_.add(input.readBytes()); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + containers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + containers_.add(input.readMessage(org.apache.slider.api.proto.Messages.ContainerInformationProto.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + names_ = new com.google.protobuf.UnmodifiableLazyStringList(names_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + containers_ = java.util.Collections.unmodifiableList(containers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.class, org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveContainersResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveContainersResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + // repeated string names = 1; + public static final int NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList names_; + /** + * repeated string names = 1; + */ + public java.util.List + getNamesList() { + return names_; + } + /** + * repeated string names = 1; + */ + public int getNamesCount() { + return names_.size(); + } + /** + * repeated string names = 1; + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * repeated string names = 1; + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + + // repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + public static final int CONTAINERS_FIELD_NUMBER = 2; + private java.util.List containers_; + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public java.util.List getContainersList() { + return containers_; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public java.util.List + getContainersOrBuilderList() { + return containers_; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public int getContainersCount() { + return containers_.size(); + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public org.apache.slider.api.proto.Messages.ContainerInformationProto getContainers(int index) { + return containers_.get(index); + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public org.apache.slider.api.proto.Messages.ContainerInformationProtoOrBuilder getContainersOrBuilder( + int index) { + return containers_.get(index); + } + + private void initFields() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + containers_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < names_.size(); i++) { + output.writeBytes(1, names_.getByteString(i)); + } + for (int i = 0; i < containers_.size(); i++) { + output.writeMessage(2, containers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(names_.getByteString(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + for (int i = 0; i < containers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, containers_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto other = (org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto) obj; + + boolean result = true; + result = result && getNamesList() + .equals(other.getNamesList()); + result = result && getContainersList() + .equals(other.getContainersList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + if (getContainersCount() > 0) { + hash = (37 * hash) + CONTAINERS_FIELD_NUMBER; + hash = (53 * hash) + getContainersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveContainersResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveContainersResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.class, org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getContainersFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + containersBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainersResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto build() { + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto result = new org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + names_ = new com.google.protobuf.UnmodifiableLazyStringList( + names_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.names_ = names_; + if (containersBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + containers_ = java.util.Collections.unmodifiableList(containers_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.containers_ = containers_; + } else { + result.containers_ = containersBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.getDefaultInstance()) return this; + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + if (containersBuilder_ == null) { + if (!other.containers_.isEmpty()) { + if (containers_.isEmpty()) { + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureContainersIsMutable(); + containers_.addAll(other.containers_); + } + onChanged(); + } + } else { + if (!other.containers_.isEmpty()) { + if (containersBuilder_.isEmpty()) { + containersBuilder_.dispose(); + containersBuilder_ = null; + containers_ = other.containers_; + bitField0_ = (bitField0_ & ~0x00000002); + containersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getContainersFieldBuilder() : null; + } else { + containersBuilder_.addAllMessages(other.containers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated string names = 1; + private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string names = 1; + */ + public java.util.List + getNamesList() { + return java.util.Collections.unmodifiableList(names_); + } + /** + * repeated string names = 1; + */ + public int getNamesCount() { + return names_.size(); + } + /** + * repeated string names = 1; + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * repeated string names = 1; + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * repeated string names = 1; + */ + public Builder setNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string names = 1; + */ + public Builder addNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + * repeated string names = 1; + */ + public Builder addAllNames( + java.lang.Iterable values) { + ensureNamesIsMutable(); + super.addAll(values, names_); + onChanged(); + return this; + } + /** + * repeated string names = 1; + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string names = 1; + */ + public Builder addNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + + // repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + private java.util.List containers_ = + java.util.Collections.emptyList(); + private void ensureContainersIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + containers_ = new java.util.ArrayList(containers_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.ContainerInformationProto, org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder, org.apache.slider.api.proto.Messages.ContainerInformationProtoOrBuilder> containersBuilder_; + + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public java.util.List getContainersList() { + if (containersBuilder_ == null) { + return java.util.Collections.unmodifiableList(containers_); + } else { + return containersBuilder_.getMessageList(); + } + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public int getContainersCount() { + if (containersBuilder_ == null) { + return containers_.size(); + } else { + return containersBuilder_.getCount(); + } + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public org.apache.slider.api.proto.Messages.ContainerInformationProto getContainers(int index) { + if (containersBuilder_ == null) { + return containers_.get(index); + } else { + return containersBuilder_.getMessage(index); + } + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder setContainers( + int index, org.apache.slider.api.proto.Messages.ContainerInformationProto value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.set(index, value); + onChanged(); + } else { + containersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder setContainers( + int index, org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.set(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder addContainers(org.apache.slider.api.proto.Messages.ContainerInformationProto value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(value); + onChanged(); + } else { + containersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder addContainers( + int index, org.apache.slider.api.proto.Messages.ContainerInformationProto value) { + if (containersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainersIsMutable(); + containers_.add(index, value); + onChanged(); + } else { + containersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder addContainers( + org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder addContainers( + int index, org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder builderForValue) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.add(index, builderForValue.build()); + onChanged(); + } else { + containersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder addAllContainers( + java.lang.Iterable values) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + super.addAll(values, containers_); + onChanged(); + } else { + containersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder clearContainers() { + if (containersBuilder_ == null) { + containers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + containersBuilder_.clear(); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public Builder removeContainers(int index) { + if (containersBuilder_ == null) { + ensureContainersIsMutable(); + containers_.remove(index); + onChanged(); + } else { + containersBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder getContainersBuilder( + int index) { + return getContainersFieldBuilder().getBuilder(index); + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public org.apache.slider.api.proto.Messages.ContainerInformationProtoOrBuilder getContainersOrBuilder( + int index) { + if (containersBuilder_ == null) { + return containers_.get(index); } else { + return containersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public java.util.List + getContainersOrBuilderList() { + if (containersBuilder_ != null) { + return containersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containers_); + } + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder addContainersBuilder() { + return getContainersFieldBuilder().addBuilder( + org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder addContainersBuilder( + int index) { + return getContainersFieldBuilder().addBuilder( + index, org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.ContainerInformationProto containers = 2; + */ + public java.util.List + getContainersBuilderList() { + return getContainersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.ContainerInformationProto, org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder, org.apache.slider.api.proto.Messages.ContainerInformationProtoOrBuilder> + getContainersFieldBuilder() { + if (containersBuilder_ == null) { + containersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.ContainerInformationProto, org.apache.slider.api.proto.Messages.ContainerInformationProto.Builder, org.apache.slider.api.proto.Messages.ContainerInformationProtoOrBuilder>( + containers_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + containers_ = null; + } + return containersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveContainersResponseProto) + } + + static { + defaultInstance = new GetLiveContainersResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveContainersResponseProto) + } + + public interface GetLiveContainerRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string containerId = 1; + /** + * required string containerId = 1; + */ + boolean hasContainerId(); + /** + * required string containerId = 1; + */ + java.lang.String getContainerId(); + /** + * required string containerId = 1; + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveContainerRequestProto} + */ + public static final class GetLiveContainerRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveContainerRequestProtoOrBuilder { + // Use GetLiveContainerRequestProto.newBuilder() to construct. + private GetLiveContainerRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveContainerRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveContainerRequestProto defaultInstance; + public static GetLiveContainerRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveContainerRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveContainerRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + containerId_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainerRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainerRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveContainerRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveContainerRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string containerId = 1; + public static final int CONTAINERID_FIELD_NUMBER = 1; + private java.lang.Object containerId_; + /** + * required string containerId = 1; + */ + public boolean hasContainerId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string containerId = 1; + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + containerId_ = s; + } + return s; + } + } + /** + * required string containerId = 1; + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + containerId_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasContainerId()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getContainerIdBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getContainerIdBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto other = (org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto) obj; + + boolean result = true; + result = result && (hasContainerId() == other.hasContainerId()); + if (hasContainerId()) { + result = result && getContainerId() + .equals(other.getContainerId()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasContainerId()) { + hash = (37 * hash) + CONTAINERID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveContainerRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveContainerRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainerRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainerRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + containerId_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveContainerRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto build() { + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto result = new org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.containerId_ = containerId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.getDefaultInstance()) return this; + if (other.hasContainerId()) { + bitField0_ |= 0x00000001; + containerId_ = other.containerId_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasContainerId()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string containerId = 1; + private java.lang.Object containerId_ = ""; + /** + * required string containerId = 1; + */ + public boolean hasContainerId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string containerId = 1; + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string containerId = 1; + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string containerId = 1; + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + containerId_ = value; + onChanged(); + return this; + } + /** + * required string containerId = 1; + */ + public Builder clearContainerId() { + bitField0_ = (bitField0_ & ~0x00000001); + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * required string containerId = 1; + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + containerId_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveContainerRequestProto) + } + + static { + defaultInstance = new GetLiveContainerRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveContainerRequestProto) + } + + public interface GetLiveComponentsRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveComponentsRequestProto} + */ + public static final class GetLiveComponentsRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveComponentsRequestProtoOrBuilder { + // Use GetLiveComponentsRequestProto.newBuilder() to construct. + private GetLiveComponentsRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveComponentsRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveComponentsRequestProto defaultInstance; + public static GetLiveComponentsRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveComponentsRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveComponentsRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveComponentsRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveComponentsRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto other = (org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveComponentsRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto build() { + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto result = new org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveComponentsRequestProto) + } + + static { + defaultInstance = new GetLiveComponentsRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveComponentsRequestProto) + } + + public interface GetLiveComponentsResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated string names = 1; + /** + * repeated string names = 1; + */ + java.util.List + getNamesList(); + /** + * repeated string names = 1; + */ + int getNamesCount(); + /** + * repeated string names = 1; + */ + java.lang.String getNames(int index); + /** + * repeated string names = 1; + */ + com.google.protobuf.ByteString + getNamesBytes(int index); + + // repeated .org.apache.slider.api.ComponentInformationProto components = 2; + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + java.util.List + getComponentsList(); + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + org.apache.slider.api.proto.Messages.ComponentInformationProto getComponents(int index); + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + int getComponentsCount(); + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + java.util.List + getComponentsOrBuilderList(); + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + org.apache.slider.api.proto.Messages.ComponentInformationProtoOrBuilder getComponentsOrBuilder( + int index); + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveComponentsResponseProto} + */ + public static final class GetLiveComponentsResponseProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveComponentsResponseProtoOrBuilder { + // Use GetLiveComponentsResponseProto.newBuilder() to construct. + private GetLiveComponentsResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveComponentsResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveComponentsResponseProto defaultInstance; + public static GetLiveComponentsResponseProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveComponentsResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveComponentsResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + names_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + names_.add(input.readBytes()); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + components_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + components_.add(input.readMessage(org.apache.slider.api.proto.Messages.ComponentInformationProto.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + names_ = new com.google.protobuf.UnmodifiableLazyStringList(names_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + components_ = java.util.Collections.unmodifiableList(components_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.class, org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveComponentsResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveComponentsResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + // repeated string names = 1; + public static final int NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList names_; + /** + * repeated string names = 1; + */ + public java.util.List + getNamesList() { + return names_; + } + /** + * repeated string names = 1; + */ + public int getNamesCount() { + return names_.size(); + } + /** + * repeated string names = 1; + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * repeated string names = 1; + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + + // repeated .org.apache.slider.api.ComponentInformationProto components = 2; + public static final int COMPONENTS_FIELD_NUMBER = 2; + private java.util.List components_; + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public java.util.List getComponentsList() { + return components_; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public java.util.List + getComponentsOrBuilderList() { + return components_; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public org.apache.slider.api.proto.Messages.ComponentInformationProto getComponents(int index) { + return components_.get(index); + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public org.apache.slider.api.proto.Messages.ComponentInformationProtoOrBuilder getComponentsOrBuilder( + int index) { + return components_.get(index); + } + + private void initFields() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + components_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < names_.size(); i++) { + output.writeBytes(1, names_.getByteString(i)); + } + for (int i = 0; i < components_.size(); i++) { + output.writeMessage(2, components_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(names_.getByteString(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + for (int i = 0; i < components_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, components_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto other = (org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto) obj; + + boolean result = true; + result = result && getNamesList() + .equals(other.getNamesList()); + result = result && getComponentsList() + .equals(other.getComponentsList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveComponentsResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.class, org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getComponentsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + componentsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto build() { + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto result = new org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + names_ = new com.google.protobuf.UnmodifiableLazyStringList( + names_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.names_ = names_; + if (componentsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + components_ = java.util.Collections.unmodifiableList(components_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.components_ = components_; + } else { + result.components_ = componentsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.getDefaultInstance()) return this; + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + if (componentsBuilder_ == null) { + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + } else { + if (!other.components_.isEmpty()) { + if (componentsBuilder_.isEmpty()) { + componentsBuilder_.dispose(); + componentsBuilder_ = null; + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000002); + componentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getComponentsFieldBuilder() : null; + } else { + componentsBuilder_.addAllMessages(other.components_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated string names = 1; + private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string names = 1; + */ + public java.util.List + getNamesList() { + return java.util.Collections.unmodifiableList(names_); + } + /** + * repeated string names = 1; + */ + public int getNamesCount() { + return names_.size(); + } + /** + * repeated string names = 1; + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + * repeated string names = 1; + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + * repeated string names = 1; + */ + public Builder setNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string names = 1; + */ + public Builder addNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + * repeated string names = 1; + */ + public Builder addAllNames( + java.lang.Iterable values) { + ensureNamesIsMutable(); + super.addAll(values, names_); + onChanged(); + return this; + } + /** + * repeated string names = 1; + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string names = 1; + */ + public Builder addNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + + // repeated .org.apache.slider.api.ComponentInformationProto components = 2; + private java.util.List components_ = + java.util.Collections.emptyList(); + private void ensureComponentsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + components_ = new java.util.ArrayList(components_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.ComponentInformationProto, org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder, org.apache.slider.api.proto.Messages.ComponentInformationProtoOrBuilder> componentsBuilder_; + + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public java.util.List getComponentsList() { + if (componentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(components_); + } else { + return componentsBuilder_.getMessageList(); + } + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public int getComponentsCount() { + if (componentsBuilder_ == null) { + return components_.size(); + } else { + return componentsBuilder_.getCount(); + } + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public org.apache.slider.api.proto.Messages.ComponentInformationProto getComponents(int index) { + if (componentsBuilder_ == null) { + return components_.get(index); + } else { + return componentsBuilder_.getMessage(index); + } + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder setComponents( + int index, org.apache.slider.api.proto.Messages.ComponentInformationProto value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + onChanged(); + } else { + componentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder setComponents( + int index, org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.set(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder addComponents(org.apache.slider.api.proto.Messages.ComponentInformationProto value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + } else { + componentsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder addComponents( + int index, org.apache.slider.api.proto.Messages.ComponentInformationProto value) { + if (componentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(index, value); + onChanged(); + } else { + componentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder addComponents( + org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder addComponents( + int index, org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder builderForValue) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(index, builderForValue.build()); + onChanged(); + } else { + componentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder addAllComponents( + java.lang.Iterable values) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + super.addAll(values, components_); + onChanged(); + } else { + componentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder clearComponents() { + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + componentsBuilder_.clear(); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public Builder removeComponents(int index) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.remove(index); + onChanged(); + } else { + componentsBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder getComponentsBuilder( + int index) { + return getComponentsFieldBuilder().getBuilder(index); + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public org.apache.slider.api.proto.Messages.ComponentInformationProtoOrBuilder getComponentsOrBuilder( + int index) { + if (componentsBuilder_ == null) { + return components_.get(index); } else { + return componentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public java.util.List + getComponentsOrBuilderList() { + if (componentsBuilder_ != null) { + return componentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(components_); + } + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder addComponentsBuilder() { + return getComponentsFieldBuilder().addBuilder( + org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder addComponentsBuilder( + int index) { + return getComponentsFieldBuilder().addBuilder( + index, org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.ComponentInformationProto components = 2; + */ + public java.util.List + getComponentsBuilderList() { + return getComponentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.ComponentInformationProto, org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder, org.apache.slider.api.proto.Messages.ComponentInformationProtoOrBuilder> + getComponentsFieldBuilder() { + if (componentsBuilder_ == null) { + componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.ComponentInformationProto, org.apache.slider.api.proto.Messages.ComponentInformationProto.Builder, org.apache.slider.api.proto.Messages.ComponentInformationProtoOrBuilder>( + components_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + components_ = null; + } + return componentsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveComponentsResponseProto) + } + + static { + defaultInstance = new GetLiveComponentsResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveComponentsResponseProto) + } + + public interface GetLiveComponentRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string name = 1; + /** + * required string name = 1; + */ + boolean hasName(); + /** + * required string name = 1; + */ + java.lang.String getName(); + /** + * required string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveComponentRequestProto} + */ + public static final class GetLiveComponentRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveComponentRequestProtoOrBuilder { + // Use GetLiveComponentRequestProto.newBuilder() to construct. + private GetLiveComponentRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveComponentRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveComponentRequestProto defaultInstance; + public static GetLiveComponentRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveComponentRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveComponentRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveComponentRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveComponentRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * required string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * required string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + name_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto other = (org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto) obj; + + boolean result = true; + result = result && (hasName() == other.hasName()); + if (hasName()) { + result = result && getName() + .equals(other.getName()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveComponentRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveComponentRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveComponentRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto build() { + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto result = new org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string name = 1; + private java.lang.Object name_ = ""; + /** + * required string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * required string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * required string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveComponentRequestProto) + } + + static { + defaultInstance = new GetLiveComponentRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveComponentRequestProto) + } + + public interface GetApplicationLivenessRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetApplicationLivenessRequestProto} + */ + public static final class GetApplicationLivenessRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetApplicationLivenessRequestProtoOrBuilder { + // Use GetApplicationLivenessRequestProto.newBuilder() to construct. + private GetApplicationLivenessRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetApplicationLivenessRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetApplicationLivenessRequestProto defaultInstance; + public static GetApplicationLivenessRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetApplicationLivenessRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetApplicationLivenessRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.class, org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetApplicationLivenessRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetApplicationLivenessRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto other = (org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetApplicationLivenessRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.class, org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto build() { + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto result = new org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetApplicationLivenessRequestProto) + } + + static { + defaultInstance = new GetApplicationLivenessRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetApplicationLivenessRequestProto) + } + + public interface EmptyPayloadProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.EmptyPayloadProto} + */ + public static final class EmptyPayloadProto extends + com.google.protobuf.GeneratedMessage + implements EmptyPayloadProtoOrBuilder { + // Use EmptyPayloadProto.newBuilder() to construct. + private EmptyPayloadProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private EmptyPayloadProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final EmptyPayloadProto defaultInstance; + public static EmptyPayloadProto getDefaultInstance() { + return defaultInstance; + } + + public EmptyPayloadProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EmptyPayloadProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EmptyPayloadProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EmptyPayloadProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.EmptyPayloadProto.class, org.apache.slider.api.proto.Messages.EmptyPayloadProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public EmptyPayloadProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EmptyPayloadProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.EmptyPayloadProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.EmptyPayloadProto other = (org.apache.slider.api.proto.Messages.EmptyPayloadProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.EmptyPayloadProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.EmptyPayloadProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.EmptyPayloadProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.EmptyPayloadProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EmptyPayloadProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EmptyPayloadProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.EmptyPayloadProto.class, org.apache.slider.api.proto.Messages.EmptyPayloadProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.EmptyPayloadProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_EmptyPayloadProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.EmptyPayloadProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.EmptyPayloadProto build() { + org.apache.slider.api.proto.Messages.EmptyPayloadProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.EmptyPayloadProto buildPartial() { + org.apache.slider.api.proto.Messages.EmptyPayloadProto result = new org.apache.slider.api.proto.Messages.EmptyPayloadProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.EmptyPayloadProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.EmptyPayloadProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.EmptyPayloadProto other) { + if (other == org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.EmptyPayloadProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.EmptyPayloadProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.EmptyPayloadProto) + } + + static { + defaultInstance = new EmptyPayloadProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.EmptyPayloadProto) + } + + public interface WrappedJsonProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string json = 1; + /** + * required string json = 1; + */ + boolean hasJson(); + /** + * required string json = 1; + */ + java.lang.String getJson(); + /** + * required string json = 1; + */ + com.google.protobuf.ByteString + getJsonBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.WrappedJsonProto} + * + *
+   **
+   *Generic JSON, often containing data structures serialized as a string
+   * 
+ */ + public static final class WrappedJsonProto extends + com.google.protobuf.GeneratedMessage + implements WrappedJsonProtoOrBuilder { + // Use WrappedJsonProto.newBuilder() to construct. + private WrappedJsonProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private WrappedJsonProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final WrappedJsonProto defaultInstance; + public static WrappedJsonProto getDefaultInstance() { + return defaultInstance; + } + + public WrappedJsonProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WrappedJsonProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + json_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_WrappedJsonProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_WrappedJsonProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, org.apache.slider.api.proto.Messages.WrappedJsonProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WrappedJsonProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WrappedJsonProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string json = 1; + public static final int JSON_FIELD_NUMBER = 1; + private java.lang.Object json_; + /** + * required string json = 1; + */ + public boolean hasJson() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string json = 1; + */ + public java.lang.String getJson() { + java.lang.Object ref = json_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + json_ = s; + } + return s; + } + } + /** + * required string json = 1; + */ + public com.google.protobuf.ByteString + getJsonBytes() { + java.lang.Object ref = json_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + json_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + json_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasJson()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getJsonBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getJsonBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.WrappedJsonProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.WrappedJsonProto other = (org.apache.slider.api.proto.Messages.WrappedJsonProto) obj; + + boolean result = true; + result = result && (hasJson() == other.hasJson()); + if (hasJson()) { + result = result && getJson() + .equals(other.getJson()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasJson()) { + hash = (37 * hash) + JSON_FIELD_NUMBER; + hash = (53 * hash) + getJson().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.WrappedJsonProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.WrappedJsonProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.WrappedJsonProto} + * + *
+     **
+     *Generic JSON, often containing data structures serialized as a string
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.WrappedJsonProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_WrappedJsonProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_WrappedJsonProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, org.apache.slider.api.proto.Messages.WrappedJsonProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.WrappedJsonProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + json_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_WrappedJsonProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.WrappedJsonProto build() { + org.apache.slider.api.proto.Messages.WrappedJsonProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.WrappedJsonProto buildPartial() { + org.apache.slider.api.proto.Messages.WrappedJsonProto result = new org.apache.slider.api.proto.Messages.WrappedJsonProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.json_ = json_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.WrappedJsonProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.WrappedJsonProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.WrappedJsonProto other) { + if (other == org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance()) return this; + if (other.hasJson()) { + bitField0_ |= 0x00000001; + json_ = other.json_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasJson()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.WrappedJsonProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.WrappedJsonProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string json = 1; + private java.lang.Object json_ = ""; + /** + * required string json = 1; + */ + public boolean hasJson() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string json = 1; + */ + public java.lang.String getJson() { + java.lang.Object ref = json_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + json_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string json = 1; + */ + public com.google.protobuf.ByteString + getJsonBytes() { + java.lang.Object ref = json_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + json_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string json = 1; + */ + public Builder setJson( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + json_ = value; + onChanged(); + return this; + } + /** + * required string json = 1; + */ + public Builder clearJson() { + bitField0_ = (bitField0_ & ~0x00000001); + json_ = getDefaultInstance().getJson(); + onChanged(); + return this; + } + /** + * required string json = 1; + */ + public Builder setJsonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + json_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.WrappedJsonProto) + } + + static { + defaultInstance = new WrappedJsonProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.WrappedJsonProto) + } + + public interface GetCertificateStoreRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string hostname = 1; + /** + * optional string hostname = 1; + */ + boolean hasHostname(); + /** + * optional string hostname = 1; + */ + java.lang.String getHostname(); + /** + * optional string hostname = 1; + */ + com.google.protobuf.ByteString + getHostnameBytes(); + + // required string requesterId = 2; + /** + * required string requesterId = 2; + */ + boolean hasRequesterId(); + /** + * required string requesterId = 2; + */ + java.lang.String getRequesterId(); + /** + * required string requesterId = 2; + */ + com.google.protobuf.ByteString + getRequesterIdBytes(); + + // required string password = 3; + /** + * required string password = 3; + */ + boolean hasPassword(); + /** + * required string password = 3; + */ + java.lang.String getPassword(); + /** + * required string password = 3; + */ + com.google.protobuf.ByteString + getPasswordBytes(); + + // required string type = 4; + /** + * required string type = 4; + */ + boolean hasType(); + /** + * required string type = 4; + */ + java.lang.String getType(); + /** + * required string type = 4; + */ + com.google.protobuf.ByteString + getTypeBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetCertificateStoreRequestProto} + */ + public static final class GetCertificateStoreRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetCertificateStoreRequestProtoOrBuilder { + // Use GetCertificateStoreRequestProto.newBuilder() to construct. + private GetCertificateStoreRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetCertificateStoreRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetCertificateStoreRequestProto defaultInstance; + public static GetCertificateStoreRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetCertificateStoreRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetCertificateStoreRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + hostname_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + requesterId_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + password_ = input.readBytes(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + type_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.class, org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetCertificateStoreRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCertificateStoreRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // optional string hostname = 1; + public static final int HOSTNAME_FIELD_NUMBER = 1; + private java.lang.Object hostname_; + /** + * optional string hostname = 1; + */ + public boolean hasHostname() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string hostname = 1; + */ + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + hostname_ = s; + } + return s; + } + } + /** + * optional string hostname = 1; + */ + public com.google.protobuf.ByteString + getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string requesterId = 2; + public static final int REQUESTERID_FIELD_NUMBER = 2; + private java.lang.Object requesterId_; + /** + * required string requesterId = 2; + */ + public boolean hasRequesterId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string requesterId = 2; + */ + public java.lang.String getRequesterId() { + java.lang.Object ref = requesterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + requesterId_ = s; + } + return s; + } + } + /** + * required string requesterId = 2; + */ + public com.google.protobuf.ByteString + getRequesterIdBytes() { + java.lang.Object ref = requesterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requesterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string password = 3; + public static final int PASSWORD_FIELD_NUMBER = 3; + private java.lang.Object password_; + /** + * required string password = 3; + */ + public boolean hasPassword() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required string password = 3; + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + password_ = s; + } + return s; + } + } + /** + * required string password = 3; + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string type = 4; + public static final int TYPE_FIELD_NUMBER = 4; + private java.lang.Object type_; + /** + * required string type = 4; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required string type = 4; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + type_ = s; + } + return s; + } + } + /** + * required string type = 4; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + hostname_ = ""; + requesterId_ = ""; + password_ = ""; + type_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRequesterId()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPassword()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasType()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getHostnameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getRequesterIdBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getPasswordBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getTypeBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getHostnameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getRequesterIdBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getPasswordBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getTypeBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto other = (org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto) obj; + + boolean result = true; + result = result && (hasHostname() == other.hasHostname()); + if (hasHostname()) { + result = result && getHostname() + .equals(other.getHostname()); + } + result = result && (hasRequesterId() == other.hasRequesterId()); + if (hasRequesterId()) { + result = result && getRequesterId() + .equals(other.getRequesterId()); + } + result = result && (hasPassword() == other.hasPassword()); + if (hasPassword()) { + result = result && getPassword() + .equals(other.getPassword()); + } + result = result && (hasType() == other.hasType()); + if (hasType()) { + result = result && getType() + .equals(other.getType()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasHostname()) { + hash = (37 * hash) + HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getHostname().hashCode(); + } + if (hasRequesterId()) { + hash = (37 * hash) + REQUESTERID_FIELD_NUMBER; + hash = (53 * hash) + getRequesterId().hashCode(); + } + if (hasPassword()) { + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + } + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetCertificateStoreRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.class, org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + hostname_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + requesterId_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + password_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + type_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto build() { + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto result = new org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.hostname_ = hostname_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.requesterId_ = requesterId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.password_ = password_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.type_ = type_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.getDefaultInstance()) return this; + if (other.hasHostname()) { + bitField0_ |= 0x00000001; + hostname_ = other.hostname_; + onChanged(); + } + if (other.hasRequesterId()) { + bitField0_ |= 0x00000002; + requesterId_ = other.requesterId_; + onChanged(); + } + if (other.hasPassword()) { + bitField0_ |= 0x00000004; + password_ = other.password_; + onChanged(); + } + if (other.hasType()) { + bitField0_ |= 0x00000008; + type_ = other.type_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRequesterId()) { + + return false; + } + if (!hasPassword()) { + + return false; + } + if (!hasType()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // optional string hostname = 1; + private java.lang.Object hostname_ = ""; + /** + * optional string hostname = 1; + */ + public boolean hasHostname() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string hostname = 1; + */ + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + hostname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string hostname = 1; + */ + public com.google.protobuf.ByteString + getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string hostname = 1; + */ + public Builder setHostname( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + hostname_ = value; + onChanged(); + return this; + } + /** + * optional string hostname = 1; + */ + public Builder clearHostname() { + bitField0_ = (bitField0_ & ~0x00000001); + hostname_ = getDefaultInstance().getHostname(); + onChanged(); + return this; + } + /** + * optional string hostname = 1; + */ + public Builder setHostnameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + hostname_ = value; + onChanged(); + return this; + } + + // required string requesterId = 2; + private java.lang.Object requesterId_ = ""; + /** + * required string requesterId = 2; + */ + public boolean hasRequesterId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string requesterId = 2; + */ + public java.lang.String getRequesterId() { + java.lang.Object ref = requesterId_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + requesterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string requesterId = 2; + */ + public com.google.protobuf.ByteString + getRequesterIdBytes() { + java.lang.Object ref = requesterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requesterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string requesterId = 2; + */ + public Builder setRequesterId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + requesterId_ = value; + onChanged(); + return this; + } + /** + * required string requesterId = 2; + */ + public Builder clearRequesterId() { + bitField0_ = (bitField0_ & ~0x00000002); + requesterId_ = getDefaultInstance().getRequesterId(); + onChanged(); + return this; + } + /** + * required string requesterId = 2; + */ + public Builder setRequesterIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + requesterId_ = value; + onChanged(); + return this; + } + + // required string password = 3; + private java.lang.Object password_ = ""; + /** + * required string password = 3; + */ + public boolean hasPassword() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required string password = 3; + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string password = 3; + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string password = 3; + */ + public Builder setPassword( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + password_ = value; + onChanged(); + return this; + } + /** + * required string password = 3; + */ + public Builder clearPassword() { + bitField0_ = (bitField0_ & ~0x00000004); + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + * required string password = 3; + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + password_ = value; + onChanged(); + return this; + } + + // required string type = 4; + private java.lang.Object type_ = ""; + /** + * required string type = 4; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required string type = 4; + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string type = 4; + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string type = 4; + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + type_ = value; + onChanged(); + return this; + } + /** + * required string type = 4; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * required string type = 4; + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + type_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetCertificateStoreRequestProto) + } + + static { + defaultInstance = new GetCertificateStoreRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetCertificateStoreRequestProto) + } + + public interface GetCertificateStoreResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required bytes store = 1; + /** + * required bytes store = 1; + */ + boolean hasStore(); + /** + * required bytes store = 1; + */ + com.google.protobuf.ByteString getStore(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetCertificateStoreResponseProto} + */ + public static final class GetCertificateStoreResponseProto extends + com.google.protobuf.GeneratedMessage + implements GetCertificateStoreResponseProtoOrBuilder { + // Use GetCertificateStoreResponseProto.newBuilder() to construct. + private GetCertificateStoreResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetCertificateStoreResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetCertificateStoreResponseProto defaultInstance; + public static GetCertificateStoreResponseProto getDefaultInstance() { + return defaultInstance; + } + + public GetCertificateStoreResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetCertificateStoreResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + store_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.class, org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetCertificateStoreResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCertificateStoreResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required bytes store = 1; + public static final int STORE_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString store_; + /** + * required bytes store = 1; + */ + public boolean hasStore() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required bytes store = 1; + */ + public com.google.protobuf.ByteString getStore() { + return store_; + } + + private void initFields() { + store_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasStore()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, store_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, store_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto other = (org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto) obj; + + boolean result = true; + result = result && (hasStore() == other.hasStore()); + if (hasStore()) { + result = result && getStore() + .equals(other.getStore()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasStore()) { + hash = (37 * hash) + STORE_FIELD_NUMBER; + hash = (53 * hash) + getStore().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetCertificateStoreResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.class, org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + store_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto build() { + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto result = new org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.store_ = store_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.getDefaultInstance()) return this; + if (other.hasStore()) { + setStore(other.getStore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasStore()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required bytes store = 1; + private com.google.protobuf.ByteString store_ = com.google.protobuf.ByteString.EMPTY; + /** + * required bytes store = 1; + */ + public boolean hasStore() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required bytes store = 1; + */ + public com.google.protobuf.ByteString getStore() { + return store_; + } + /** + * required bytes store = 1; + */ + public Builder setStore(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + store_ = value; + onChanged(); + return this; + } + /** + * required bytes store = 1; + */ + public Builder clearStore() { + bitField0_ = (bitField0_ & ~0x00000001); + store_ = getDefaultInstance().getStore(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetCertificateStoreResponseProto) + } + + static { + defaultInstance = new GetCertificateStoreResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetCertificateStoreResponseProto) + } + + public interface GetLiveNodesRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveNodesRequestProto} + */ + public static final class GetLiveNodesRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveNodesRequestProtoOrBuilder { + // Use GetLiveNodesRequestProto.newBuilder() to construct. + private GetLiveNodesRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveNodesRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveNodesRequestProto defaultInstance; + public static GetLiveNodesRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveNodesRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveNodesRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveNodesRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveNodesRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto other = (org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveNodesRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveNodesRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto build() { + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto result = new org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveNodesRequestProto) + } + + static { + defaultInstance = new GetLiveNodesRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveNodesRequestProto) + } + + public interface GetLiveNodesResponseProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + java.util.List + getNodesList(); + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + org.apache.slider.api.proto.Messages.NodeInformationProto getNodes(int index); + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + int getNodesCount(); + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + java.util.List + getNodesOrBuilderList(); + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + org.apache.slider.api.proto.Messages.NodeInformationProtoOrBuilder getNodesOrBuilder( + int index); + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveNodesResponseProto} + */ + public static final class GetLiveNodesResponseProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveNodesResponseProtoOrBuilder { + // Use GetLiveNodesResponseProto.newBuilder() to construct. + private GetLiveNodesResponseProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveNodesResponseProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveNodesResponseProto defaultInstance; + public static GetLiveNodesResponseProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveNodesResponseProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveNodesResponseProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + nodes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + nodes_.add(input.readMessage(org.apache.slider.api.proto.Messages.NodeInformationProto.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.class, org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveNodesResponseProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveNodesResponseProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + // repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + public static final int NODES_FIELD_NUMBER = 1; + private java.util.List nodes_; + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public java.util.List getNodesList() { + return nodes_; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public java.util.List + getNodesOrBuilderList() { + return nodes_; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public int getNodesCount() { + return nodes_.size(); + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public org.apache.slider.api.proto.Messages.NodeInformationProto getNodes(int index) { + return nodes_.get(index); + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public org.apache.slider.api.proto.Messages.NodeInformationProtoOrBuilder getNodesOrBuilder( + int index) { + return nodes_.get(index); + } + + private void initFields() { + nodes_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getNodesCount(); i++) { + if (!getNodes(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < nodes_.size(); i++) { + output.writeMessage(1, nodes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < nodes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, nodes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto other = (org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto) obj; + + boolean result = true; + result = result && getNodesList() + .equals(other.getNodesList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getNodesCount() > 0) { + hash = (37 * hash) + NODES_FIELD_NUMBER; + hash = (53 * hash) + getNodesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveNodesResponseProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveNodesResponseProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesResponseProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesResponseProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.class, org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNodesFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + nodesBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodesResponseProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto build() { + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto result = new org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto(this); + int from_bitField0_ = bitField0_; + if (nodesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodes_ = nodes_; + } else { + result.nodes_ = nodesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.getDefaultInstance()) return this; + if (nodesBuilder_ == null) { + if (!other.nodes_.isEmpty()) { + if (nodes_.isEmpty()) { + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodesIsMutable(); + nodes_.addAll(other.nodes_); + } + onChanged(); + } + } else { + if (!other.nodes_.isEmpty()) { + if (nodesBuilder_.isEmpty()) { + nodesBuilder_.dispose(); + nodesBuilder_ = null; + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + nodesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getNodesFieldBuilder() : null; + } else { + nodesBuilder_.addAllMessages(other.nodes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getNodesCount(); i++) { + if (!getNodes(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + private java.util.List nodes_ = + java.util.Collections.emptyList(); + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + nodes_ = new java.util.ArrayList(nodes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.NodeInformationProto, org.apache.slider.api.proto.Messages.NodeInformationProto.Builder, org.apache.slider.api.proto.Messages.NodeInformationProtoOrBuilder> nodesBuilder_; + + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); + } else { + return nodesBuilder_.getMessageList(); + } + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); + } else { + return nodesBuilder_.getCount(); + } + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public org.apache.slider.api.proto.Messages.NodeInformationProto getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessage(index); + } + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder setNodes( + int index, org.apache.slider.api.proto.Messages.NodeInformationProto value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); + onChanged(); + } else { + nodesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder setNodes( + int index, org.apache.slider.api.proto.Messages.NodeInformationProto.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder addNodes(org.apache.slider.api.proto.Messages.NodeInformationProto value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + } else { + nodesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder addNodes( + int index, org.apache.slider.api.proto.Messages.NodeInformationProto value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); + } else { + nodesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder addNodes( + org.apache.slider.api.proto.Messages.NodeInformationProto.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder addNodes( + int index, org.apache.slider.api.proto.Messages.NodeInformationProto.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder addAllNodes( + java.lang.Iterable values) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + super.addAll(values, nodes_); + onChanged(); + } else { + nodesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodesBuilder_.clear(); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public org.apache.slider.api.proto.Messages.NodeInformationProto.Builder getNodesBuilder( + int index) { + return getNodesFieldBuilder().getBuilder(index); + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public org.apache.slider.api.proto.Messages.NodeInformationProtoOrBuilder getNodesOrBuilder( + int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); } else { + return nodesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public java.util.List + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); + } + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public org.apache.slider.api.proto.Messages.NodeInformationProto.Builder addNodesBuilder() { + return getNodesFieldBuilder().addBuilder( + org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public org.apache.slider.api.proto.Messages.NodeInformationProto.Builder addNodesBuilder( + int index) { + return getNodesFieldBuilder().addBuilder( + index, org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance()); + } + /** + * repeated .org.apache.slider.api.NodeInformationProto nodes = 1; + */ + public java.util.List + getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.NodeInformationProto, org.apache.slider.api.proto.Messages.NodeInformationProto.Builder, org.apache.slider.api.proto.Messages.NodeInformationProtoOrBuilder> + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.slider.api.proto.Messages.NodeInformationProto, org.apache.slider.api.proto.Messages.NodeInformationProto.Builder, org.apache.slider.api.proto.Messages.NodeInformationProtoOrBuilder>( + nodes_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + nodes_ = null; + } + return nodesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveNodesResponseProto) + } + + static { + defaultInstance = new GetLiveNodesResponseProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveNodesResponseProto) + } + + public interface GetLiveNodeRequestProtoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string name = 1; + /** + * required string name = 1; + */ + boolean hasName(); + /** + * required string name = 1; + */ + java.lang.String getName(); + /** + * required string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveNodeRequestProto} + */ + public static final class GetLiveNodeRequestProto extends + com.google.protobuf.GeneratedMessage + implements GetLiveNodeRequestProtoOrBuilder { + // Use GetLiveNodeRequestProto.newBuilder() to construct. + private GetLiveNodeRequestProto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetLiveNodeRequestProto(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetLiveNodeRequestProto defaultInstance; + public static GetLiveNodeRequestProto getDefaultInstance() { + return defaultInstance; + } + + public GetLiveNodeRequestProto getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetLiveNodeRequestProto( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodeRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodeRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetLiveNodeRequestProto parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLiveNodeRequestProto(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * required string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * required string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + name_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto)) { + return super.equals(obj); + } + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto other = (org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto) obj; + + boolean result = true; + result = result && (hasName() == other.hasName()); + if (hasName()) { + result = result && getName() + .equals(other.getName()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.slider.api.GetLiveNodeRequestProto} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.slider.api.proto.Messages.GetLiveNodeRequestProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodeRequestProto_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodeRequestProto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.class, org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.Builder.class); + } + + // Construct using org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.slider.api.proto.Messages.internal_static_org_apache_slider_api_GetLiveNodeRequestProto_descriptor; + } + + public org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto getDefaultInstanceForType() { + return org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.getDefaultInstance(); + } + + public org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto build() { + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto buildPartial() { + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto result = new org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto) { + return mergeFrom((org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto other) { + if (other == org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.getDefaultInstance()) return this; + if (other.hasName()) { + bitField0_ |= 0x00000001; + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string name = 1; + private java.lang.Object name_ = ""; + /** + * required string name = 1; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + /** + * required string name = 1; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * required string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.apache.slider.api.GetLiveNodeRequestProto) + } + + static { + defaultInstance = new GetLiveNodeRequestProto(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.GetLiveNodeRequestProto) + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_RoleInstanceState_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_RoleInstanceState_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_StopClusterRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_StopClusterRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_StopClusterResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_StopClusterResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_UpgradeContainersRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_UpgradeContainersRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_UpgradeContainersResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_UpgradeContainersResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_FlexClusterRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_FlexClusterRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_FlexClusterResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_FlexClusterResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetNodeRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetNodeRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetNodeResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetNodeResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetClusterNodesRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetClusterNodesRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetClusterNodesResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetClusterNodesResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_EchoRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_EchoRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_EchoResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_EchoResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_KillContainerRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_KillContainerRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_KillContainerResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_KillContainerResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_AMSuicideRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_AMSuicideRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_AMSuicideResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_AMSuicideResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_ComponentInformationProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_ComponentInformationProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_ContainerInformationProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_ContainerInformationProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_PingInformationProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_PingInformationProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_NodeEntryInformationProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_NodeEntryInformationProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_NodeInformationProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_NodeInformationProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetModelRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetModelRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetModelDesiredRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetModelDesiredRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveContainersRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveContainersRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveContainersResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveContainersResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveContainerRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveContainerRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveComponentRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveComponentRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_EmptyPayloadProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_EmptyPayloadProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_WrappedJsonProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_WrappedJsonProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveNodesRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveNodesRequestProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveNodesResponseProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveNodesResponseProto_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_slider_api_GetLiveNodeRequestProto_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_slider_api_GetLiveNodeRequestProto_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033SliderClusterMessages.proto\022\025org.apach" + + "e.slider.api\"\227\002\n\021RoleInstanceState\022\014\n\004na" + + "me\030\001 \002(\t\022\014\n\004role\030\002 \001(\t\022\r\n\005state\030\004 \002(\r\022\020\n" + + "\010exitCode\030\005 \002(\r\022\017\n\007command\030\006 \001(\t\022\023\n\013diag" + + "nostics\030\007 \001(\t\022\016\n\006output\030\010 \003(\t\022\023\n\013environ" + + "ment\030\t \003(\t\022\016\n\006roleId\030\n \002(\r\022\020\n\010released\030\013" + + " \002(\010\022\022\n\ncreateTime\030\014 \002(\003\022\021\n\tstartTime\030\r " + + "\002(\003\022\014\n\004host\030\016 \002(\t\022\017\n\007hostURL\030\017 \002(\t\022\022\n\nap" + + "pVersion\030\020 \001(\t\"*\n\027StopClusterRequestProt" + + "o\022\017\n\007message\030\001 \002(\t\"\032\n\030StopClusterRespons", + "eProto\"V\n\035UpgradeContainersRequestProto\022" + + "\017\n\007message\030\001 \002(\t\022\021\n\tcontainer\030\002 \003(\t\022\021\n\tc" + + "omponent\030\003 \003(\t\" \n\036UpgradeContainersRespo" + + "nseProto\".\n\027FlexClusterRequestProto\022\023\n\013c" + + "lusterSpec\030\001 \002(\t\",\n\030FlexClusterResponseP" + + "roto\022\020\n\010response\030\001 \002(\010\"\"\n GetJSONCluster" + + "StatusRequestProto\"8\n!GetJSONClusterStat" + + "usResponseProto\022\023\n\013clusterSpec\030\001 \002(\t\"/\n\037" + + "ListNodeUUIDsByRoleRequestProto\022\014\n\004role\030" + + "\001 \002(\t\"0\n ListNodeUUIDsByRoleResponseProt", + "o\022\014\n\004uuid\030\001 \003(\t\"#\n\023GetNodeRequestProto\022\014" + + "\n\004uuid\030\001 \002(\t\"U\n\024GetNodeResponseProto\022=\n\013" + + "clusterNode\030\001 \002(\0132(.org.apache.slider.ap" + + "i.RoleInstanceState\"+\n\033GetClusterNodesRe" + + "questProto\022\014\n\004uuid\030\001 \003(\t\"]\n\034GetClusterNo" + + "desResponseProto\022=\n\013clusterNode\030\001 \003(\0132(." + + "org.apache.slider.api.RoleInstanceState\"" + + " \n\020EchoRequestProto\022\014\n\004text\030\001 \002(\t\"!\n\021Ech" + + "oResponseProto\022\014\n\004text\030\001 \002(\t\"\'\n\031KillCont" + + "ainerRequestProto\022\n\n\002id\030\001 \002(\t\"-\n\032KillCon", + "tainerResponseProto\022\017\n\007success\030\001 \002(\010\"D\n\025" + + "AMSuicideRequestProto\022\014\n\004text\030\001 \002(\t\022\016\n\006s" + + "ignal\030\002 \002(\005\022\r\n\005delay\030\003 \002(\005\"\030\n\026AMSuicideR" + + "esponseProto\"#\n!GetInstanceDefinitionReq" + + "uestProto\"^\n\"GetInstanceDefinitionRespon" + + "seProto\022\020\n\010internal\030\001 \002(\t\022\021\n\tresources\030\002" + + " \002(\t\022\023\n\013application\030\003 \002(\t\"`\n#Application" + + "LivenessInformationProto\022\034\n\024allRequestsS" + + "atisfied\030\001 \001(\010\022\033\n\023requestsOutstanding\030\002 " + + "\001(\005\"\256\003\n\031ComponentInformationProto\022\014\n\004nam", + "e\030\001 \001(\t\022\020\n\010priority\030\002 \001(\005\022\017\n\007desired\030\003 \001" + + "(\005\022\016\n\006actual\030\004 \001(\005\022\021\n\treleasing\030\005 \001(\005\022\021\n" + + "\trequested\030\006 \001(\005\022\016\n\006failed\030\007 \001(\005\022\017\n\007star" + + "ted\030\010 \001(\005\022\023\n\013startFailed\030\t \001(\005\022\021\n\tcomple" + + "ted\030\n \001(\005\022\026\n\016totalRequested\030\013 \001(\005\022\026\n\016fai" + + "lureMessage\030\014 \001(\t\022\027\n\017placementPolicy\030\r \001" + + "(\005\022\022\n\ncontainers\030\016 \003(\t\022\026\n\016failedRecently" + + "\030\017 \001(\005\022\022\n\nnodeFailed\030\020 \001(\005\022\021\n\tpreempted\030" + + "\021 \001(\005\022%\n\035pendingAntiAffineRequestCount\030\022" + + " \001(\005\022\036\n\026isAARequestOutstanding\030\023 \001(\010\"\210\002\n", + "\031ContainerInformationProto\022\023\n\013containerI" + + "d\030\001 \001(\t\022\021\n\tcomponent\030\002 \001(\t\022\020\n\010released\030\003" + + " \001(\010\022\r\n\005state\030\004 \001(\005\022\020\n\010exitCode\030\005 \001(\005\022\023\n" + + "\013diagnostics\030\006 \001(\t\022\022\n\ncreateTime\030\007 \001(\003\022\021" + + "\n\tstartTime\030\010 \001(\003\022\016\n\006output\030\t \003(\t\022\014\n\004hos" + + "t\030\n \001(\t\022\017\n\007hostURL\030\013 \001(\t\022\021\n\tplacement\030\014 " + + "\001(\t\022\022\n\nappVersion\030\r \001(\t\"N\n\024PingInformati" + + "onProto\022\014\n\004text\030\001 \001(\t\022\014\n\004verb\030\002 \001(\t\022\014\n\004b" + + "ody\030\003 \001(\t\022\014\n\004time\030\004 \001(\003\"\343\001\n\031NodeEntryInf" + + "ormationProto\022\020\n\010priority\030\001 \002(\005\022\021\n\treque", + "sted\030\002 \002(\005\022\020\n\010starting\030\003 \002(\005\022\023\n\013startFai" + + "led\030\004 \002(\005\022\016\n\006failed\030\005 \002(\005\022\026\n\016failedRecen" + + "tly\030\006 \002(\005\022\021\n\tpreempted\030\007 \002(\005\022\014\n\004live\030\010 \002" + + "(\005\022\021\n\treleasing\030\t \002(\005\022\020\n\010lastUsed\030\n \002(\003\022" + + "\014\n\004name\030\013 \002(\t\"\334\001\n\024NodeInformationProto\022\020" + + "\n\010hostname\030\001 \002(\t\022\r\n\005state\030\002 \002(\t\022\023\n\013httpA" + + "ddress\030\003 \002(\t\022\020\n\010rackName\030\004 \002(\t\022\016\n\006labels" + + "\030\005 \002(\t\022\024\n\014healthReport\030\006 \002(\t\022\023\n\013lastUpda" + + "ted\030\007 \002(\003\022A\n\007entries\030\010 \003(\01320.org.apache." + + "slider.api.NodeEntryInformationProto\"\026\n\024", + "GetModelRequestProto\"\035\n\033GetModelDesiredR" + + "equestProto\"$\n\"GetModelDesiredAppconfReq" + + "uestProto\"&\n$GetModelDesiredResourcesReq" + + "uestProto\"%\n#GetModelResolvedAppconfRequ" + + "estProto\"\'\n%GetModelResolvedResourcesReq" + + "uestProto\"#\n!GetModelLiveResourcesReques" + + "tProto\"\037\n\035GetLiveContainersRequestProto\"" + + "u\n\036GetLiveContainersResponseProto\022\r\n\005nam" + + "es\030\001 \003(\t\022D\n\ncontainers\030\002 \003(\01320.org.apach" + + "e.slider.api.ContainerInformationProto\"3", + "\n\034GetLiveContainerRequestProto\022\023\n\013contai" + + "nerId\030\001 \002(\t\"\037\n\035GetLiveComponentsRequestP" + + "roto\"u\n\036GetLiveComponentsResponseProto\022\r" + + "\n\005names\030\001 \003(\t\022D\n\ncomponents\030\002 \003(\01320.org." + + "apache.slider.api.ComponentInformationPr" + + "oto\",\n\034GetLiveComponentRequestProto\022\014\n\004n" + + "ame\030\001 \002(\t\"$\n\"GetApplicationLivenessReque" + + "stProto\"\023\n\021EmptyPayloadProto\" \n\020WrappedJ" + + "sonProto\022\014\n\004json\030\001 \002(\t\"h\n\037GetCertificate" + + "StoreRequestProto\022\020\n\010hostname\030\001 \001(\t\022\023\n\013r", + "equesterId\030\002 \002(\t\022\020\n\010password\030\003 \002(\t\022\014\n\004ty" + + "pe\030\004 \002(\t\"1\n GetCertificateStoreResponseP" + + "roto\022\r\n\005store\030\001 \002(\014\"\032\n\030GetLiveNodesReque" + + "stProto\"W\n\031GetLiveNodesResponseProto\022:\n\005" + + "nodes\030\001 \003(\0132+.org.apache.slider.api.Node" + + "InformationProto\"\'\n\027GetLiveNodeRequestPr" + + "oto\022\014\n\004name\030\001 \002(\tB-\n\033org.apache.slider.a" + + "pi.protoB\010Messages\210\001\001\240\001\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_apache_slider_api_RoleInstanceState_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_slider_api_RoleInstanceState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_RoleInstanceState_descriptor, + new java.lang.String[] { "Name", "Role", "State", "ExitCode", "Command", "Diagnostics", "Output", "Environment", "RoleId", "Released", "CreateTime", "StartTime", "Host", "HostURL", "AppVersion", }); + internal_static_org_apache_slider_api_StopClusterRequestProto_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_apache_slider_api_StopClusterRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_StopClusterRequestProto_descriptor, + new java.lang.String[] { "Message", }); + internal_static_org_apache_slider_api_StopClusterResponseProto_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_org_apache_slider_api_StopClusterResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_StopClusterResponseProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_UpgradeContainersRequestProto_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_org_apache_slider_api_UpgradeContainersRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_UpgradeContainersRequestProto_descriptor, + new java.lang.String[] { "Message", "Container", "Component", }); + internal_static_org_apache_slider_api_UpgradeContainersResponseProto_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_org_apache_slider_api_UpgradeContainersResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_UpgradeContainersResponseProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_FlexClusterRequestProto_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_org_apache_slider_api_FlexClusterRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_FlexClusterRequestProto_descriptor, + new java.lang.String[] { "ClusterSpec", }); + internal_static_org_apache_slider_api_FlexClusterResponseProto_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_org_apache_slider_api_FlexClusterResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_FlexClusterResponseProto_descriptor, + new java.lang.String[] { "Response", }); + internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetJSONClusterStatusRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetJSONClusterStatusResponseProto_descriptor, + new java.lang.String[] { "ClusterSpec", }); + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleRequestProto_descriptor, + new java.lang.String[] { "Role", }); + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_ListNodeUUIDsByRoleResponseProto_descriptor, + new java.lang.String[] { "Uuid", }); + internal_static_org_apache_slider_api_GetNodeRequestProto_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_org_apache_slider_api_GetNodeRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetNodeRequestProto_descriptor, + new java.lang.String[] { "Uuid", }); + internal_static_org_apache_slider_api_GetNodeResponseProto_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_org_apache_slider_api_GetNodeResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetNodeResponseProto_descriptor, + new java.lang.String[] { "ClusterNode", }); + internal_static_org_apache_slider_api_GetClusterNodesRequestProto_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_org_apache_slider_api_GetClusterNodesRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetClusterNodesRequestProto_descriptor, + new java.lang.String[] { "Uuid", }); + internal_static_org_apache_slider_api_GetClusterNodesResponseProto_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_org_apache_slider_api_GetClusterNodesResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetClusterNodesResponseProto_descriptor, + new java.lang.String[] { "ClusterNode", }); + internal_static_org_apache_slider_api_EchoRequestProto_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_org_apache_slider_api_EchoRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_EchoRequestProto_descriptor, + new java.lang.String[] { "Text", }); + internal_static_org_apache_slider_api_EchoResponseProto_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_org_apache_slider_api_EchoResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_EchoResponseProto_descriptor, + new java.lang.String[] { "Text", }); + internal_static_org_apache_slider_api_KillContainerRequestProto_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_org_apache_slider_api_KillContainerRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_KillContainerRequestProto_descriptor, + new java.lang.String[] { "Id", }); + internal_static_org_apache_slider_api_KillContainerResponseProto_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_org_apache_slider_api_KillContainerResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_KillContainerResponseProto_descriptor, + new java.lang.String[] { "Success", }); + internal_static_org_apache_slider_api_AMSuicideRequestProto_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_org_apache_slider_api_AMSuicideRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_AMSuicideRequestProto_descriptor, + new java.lang.String[] { "Text", "Signal", "Delay", }); + internal_static_org_apache_slider_api_AMSuicideResponseProto_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_org_apache_slider_api_AMSuicideResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_AMSuicideResponseProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetInstanceDefinitionRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetInstanceDefinitionResponseProto_descriptor, + new java.lang.String[] { "Internal", "Resources", "Application", }); + internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_ApplicationLivenessInformationProto_descriptor, + new java.lang.String[] { "AllRequestsSatisfied", "RequestsOutstanding", }); + internal_static_org_apache_slider_api_ComponentInformationProto_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_org_apache_slider_api_ComponentInformationProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_ComponentInformationProto_descriptor, + new java.lang.String[] { "Name", "Priority", "Desired", "Actual", "Releasing", "Requested", "Failed", "Started", "StartFailed", "Completed", "TotalRequested", "FailureMessage", "PlacementPolicy", "Containers", "FailedRecently", "NodeFailed", "Preempted", "PendingAntiAffineRequestCount", "IsAARequestOutstanding", }); + internal_static_org_apache_slider_api_ContainerInformationProto_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_org_apache_slider_api_ContainerInformationProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_ContainerInformationProto_descriptor, + new java.lang.String[] { "ContainerId", "Component", "Released", "State", "ExitCode", "Diagnostics", "CreateTime", "StartTime", "Output", "Host", "HostURL", "Placement", "AppVersion", }); + internal_static_org_apache_slider_api_PingInformationProto_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_org_apache_slider_api_PingInformationProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_PingInformationProto_descriptor, + new java.lang.String[] { "Text", "Verb", "Body", "Time", }); + internal_static_org_apache_slider_api_NodeEntryInformationProto_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_org_apache_slider_api_NodeEntryInformationProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_NodeEntryInformationProto_descriptor, + new java.lang.String[] { "Priority", "Requested", "Starting", "StartFailed", "Failed", "FailedRecently", "Preempted", "Live", "Releasing", "LastUsed", "Name", }); + internal_static_org_apache_slider_api_NodeInformationProto_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_org_apache_slider_api_NodeInformationProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_NodeInformationProto_descriptor, + new java.lang.String[] { "Hostname", "State", "HttpAddress", "RackName", "Labels", "HealthReport", "LastUpdated", "Entries", }); + internal_static_org_apache_slider_api_GetModelRequestProto_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_org_apache_slider_api_GetModelRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetModelRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetModelDesiredRequestProto_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_org_apache_slider_api_GetModelDesiredRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetModelDesiredRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetModelDesiredAppconfRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetModelDesiredResourcesRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetModelResolvedAppconfRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetModelResolvedResourcesRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetModelLiveResourcesRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetLiveContainersRequestProto_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_org_apache_slider_api_GetLiveContainersRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveContainersRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetLiveContainersResponseProto_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_org_apache_slider_api_GetLiveContainersResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveContainersResponseProto_descriptor, + new java.lang.String[] { "Names", "Containers", }); + internal_static_org_apache_slider_api_GetLiveContainerRequestProto_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_org_apache_slider_api_GetLiveContainerRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveContainerRequestProto_descriptor, + new java.lang.String[] { "ContainerId", }); + internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveComponentsRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveComponentsResponseProto_descriptor, + new java.lang.String[] { "Names", "Components", }); + internal_static_org_apache_slider_api_GetLiveComponentRequestProto_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_org_apache_slider_api_GetLiveComponentRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveComponentRequestProto_descriptor, + new java.lang.String[] { "Name", }); + internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetApplicationLivenessRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_EmptyPayloadProto_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_org_apache_slider_api_EmptyPayloadProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_EmptyPayloadProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_WrappedJsonProto_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_org_apache_slider_api_WrappedJsonProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_WrappedJsonProto_descriptor, + new java.lang.String[] { "Json", }); + internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetCertificateStoreRequestProto_descriptor, + new java.lang.String[] { "Hostname", "RequesterId", "Password", "Type", }); + internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetCertificateStoreResponseProto_descriptor, + new java.lang.String[] { "Store", }); + internal_static_org_apache_slider_api_GetLiveNodesRequestProto_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_org_apache_slider_api_GetLiveNodesRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveNodesRequestProto_descriptor, + new java.lang.String[] { }); + internal_static_org_apache_slider_api_GetLiveNodesResponseProto_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_org_apache_slider_api_GetLiveNodesResponseProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveNodesResponseProto_descriptor, + new java.lang.String[] { "Nodes", }); + internal_static_org_apache_slider_api_GetLiveNodeRequestProto_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_org_apache_slider_api_GetLiveNodeRequestProto_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_slider_api_GetLiveNodeRequestProto_descriptor, + new java.lang.String[] { "Name", }); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/RestTypeMarshalling.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/RestTypeMarshalling.java new file mode 100644 index 00000000000..17fd965e7d6 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/RestTypeMarshalling.java @@ -0,0 +1,319 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.proto; + +import com.google.protobuf.ByteString; +import org.apache.commons.io.IOUtils; +import org.apache.slider.api.types.ApplicationLivenessInformation; +import org.apache.slider.api.types.ComponentInformation; +import org.apache.slider.api.types.ContainerInformation; +import org.apache.slider.api.types.NodeEntryInformation; +import org.apache.slider.api.types.NodeInformation; +import org.apache.slider.core.conf.AggregateConf; +import org.apache.slider.core.conf.ConfTree; +import org.apache.slider.core.conf.ConfTreeOperations; +import org.apache.slider.core.persist.AggregateConfSerDeser; +import org.apache.slider.core.persist.ConfTreeSerDeser; +import org.apache.slider.server.services.security.SecurityStore; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Class to handle marshalling of REST + * types to/from Protobuf records. + */ +public class RestTypeMarshalling { + + public static Messages.ApplicationLivenessInformationProto + marshall(ApplicationLivenessInformation info) { + + Messages.ApplicationLivenessInformationProto.Builder builder = + Messages.ApplicationLivenessInformationProto.newBuilder(); + builder.setAllRequestsSatisfied(info.allRequestsSatisfied); + builder.setRequestsOutstanding(info.requestsOutstanding); + return builder.build(); + } + + public static ApplicationLivenessInformation + unmarshall(Messages.ApplicationLivenessInformationProto wire) { + ApplicationLivenessInformation info = new ApplicationLivenessInformation(); + info.allRequestsSatisfied = wire.getAllRequestsSatisfied(); + info.requestsOutstanding = wire.getRequestsOutstanding(); + return info; + } + + public static ComponentInformation + unmarshall(Messages.ComponentInformationProto wire) { + ComponentInformation info = new ComponentInformation(); + info.name = wire.getName(); + info.priority = wire.getPriority(); + info.placementPolicy = wire.getPlacementPolicy(); + + info.actual = wire.getActual(); + info.completed = wire.getCompleted(); + info.desired = wire.getDesired(); + info.failed = wire.getFailed(); + info.releasing = wire.getReleasing(); + info.requested = wire.getRequested(); + info.started = wire.getStarted(); + info.startFailed = wire.getStartFailed(); + info.totalRequested = wire.getTotalRequested(); + info.containers = new ArrayList<>(wire.getContainersList()); + if (wire.hasFailureMessage()) { + info.failureMessage = wire.getFailureMessage(); + } + if (wire.hasPendingAntiAffineRequestCount()) { + info.pendingAntiAffineRequestCount = wire.getPendingAntiAffineRequestCount(); + } + if (wire.hasIsAARequestOutstanding()) { + info.isAARequestOutstanding = wire.getIsAARequestOutstanding(); + } + return info; + } + + public static Messages.GetCertificateStoreResponseProto marshall( + SecurityStore securityStore) throws IOException { + Messages.GetCertificateStoreResponseProto.Builder builder = + Messages.GetCertificateStoreResponseProto.newBuilder(); + builder.setStore(ByteString.copyFrom(getStoreBytes(securityStore))); + + return builder.build(); + } + + private static byte[] getStoreBytes(SecurityStore securityStore) + throws IOException { + InputStream is = null; + byte[] storeBytes; + try { + is = new FileInputStream(securityStore.getFile()); + storeBytes = IOUtils.toByteArray(is); + } finally { + if (is != null) { + is.close(); + } + } + return storeBytes; + } + + public static byte[] unmarshall(Messages.GetCertificateStoreResponseProto response) { + return response.getStore().toByteArray(); + } + + public static Messages.ComponentInformationProto marshall(ComponentInformation info) { + + Messages.ComponentInformationProto.Builder builder = + Messages.ComponentInformationProto.newBuilder(); + builder.setName(info.name); + builder.setPriority(info.priority); + builder.setPlacementPolicy(info.placementPolicy); + + builder.setActual(info.actual); + builder.setCompleted(info.completed); + builder.setDesired(info.desired); + builder.setFailed(info.failed); + builder.setReleasing(info.releasing); + builder.setRequested(info.requested); + builder.setStarted(info.started); + builder.setStartFailed(info.startFailed); + builder.setTotalRequested(info.totalRequested); + builder.setNodeFailed(info.nodeFailed); + builder.setPreempted(info.preempted); + builder.setFailedRecently(info.failedRecently); + if (info.failureMessage != null) { + builder.setFailureMessage(info.failureMessage); + } + if (info.containers != null) { + builder.addAllContainers(info.containers); + } + builder.setPendingAntiAffineRequestCount(info.pendingAntiAffineRequestCount); + builder.setIsAARequestOutstanding(info.isAARequestOutstanding); + return builder.build(); + } + + public static Messages.NodeInformationProto marshall(NodeInformation info) { + + Messages.NodeInformationProto.Builder builder = + Messages.NodeInformationProto.newBuilder(); + builder.setHostname(info.hostname); + builder.setLastUpdated(info.lastUpdated); + builder.setState(info.state != null? info.state : "unknown"); + builder.setRackName(info.rackName != null ? info.rackName : ""); + builder.setHealthReport(info.healthReport != null ? info.healthReport : ""); + builder.setHttpAddress(info.httpAddress != null ? info.httpAddress : ""); + builder.setLabels(info.labels != null ? info.labels: ""); + + + if (info.entries != null) { + for (Map.Entry elt : info.entries.entrySet()) { + NodeEntryInformation entry = elt.getValue(); + Messages.NodeEntryInformationProto.Builder node = + Messages.NodeEntryInformationProto.newBuilder(); + node.setPriority(entry.priority); + node.setName(elt.getKey()); + node.setFailed(entry.failed); + node.setFailedRecently(entry.failedRecently); + node.setLive(entry.live); + node.setLastUsed(entry.lastUsed); + node.setPreempted(entry.preempted); + node.setRequested(entry.requested); + node.setReleasing(entry.releasing); + node.setStartFailed(entry.startFailed); + node.setStarting(entry.starting); + builder.addEntries(node.build()); + } + } + return builder.build(); + } + + public static NodeInformation unmarshall(Messages.NodeInformationProto wire) { + NodeInformation info = new NodeInformation(); + info.healthReport = wire.getHealthReport(); + info.hostname = wire.getHostname(); + info.httpAddress = wire.getHttpAddress(); + info.labels = wire.getLabels(); + info.lastUpdated = wire.getLastUpdated(); + info.rackName = wire.getRackName(); + info.state = wire.getState(); + List entriesList = wire.getEntriesList(); + if (entriesList != null) { + info.entries = new HashMap<>(entriesList.size()); + for (Messages.NodeEntryInformationProto entry : entriesList) { + NodeEntryInformation nei = new NodeEntryInformation(); + nei.failed = entry.getFailed(); + nei.failedRecently = entry.getFailedRecently(); + nei.lastUsed = entry.getLastUsed(); + nei.live = entry.getLive(); + nei.preempted = entry.getPreempted(); + nei.priority = entry.getPriority(); + nei.requested = entry.getRequested(); + nei.releasing = entry.getReleasing(); + nei.startFailed = entry.getStartFailed(); + nei.starting = entry.getStarting(); + info.entries.put(entry.getName(), nei); + } + } + return info; + } + + public static ContainerInformation unmarshall(Messages.ContainerInformationProto wire) { + ContainerInformation info = new ContainerInformation(); + info.containerId = wire.getContainerId(); + info.component = wire.getComponent(); + info.appVersion = wire.getAppVersion(); + info.state = wire.getState(); + if (wire.hasReleased()) { + info.released = wire.getReleased(); + } + if (wire.hasExitCode()) { + info.exitCode = wire.getExitCode(); + } + if (wire.hasDiagnostics()) { + info.diagnostics = wire.getDiagnostics(); + } + if (wire.hasHost()) { + info.host = wire.getHost(); + } + if (wire.hasHostURL()) { + info.host = wire.getHostURL(); + } + info.createTime = wire.getCreateTime(); + info.startTime = wire.getStartTime(); + info.output = wire.getOutputList().toArray( + new String[wire.getOutputCount()] + ); + if (wire.hasPlacement()) { + info.placement = wire.getPlacement(); + } + return info; + } + + public static List unmarshall(Messages.GetLiveContainersResponseProto wire) { + List infoList = new ArrayList<>(wire.getContainersList().size()); + for (Messages.ContainerInformationProto container : wire.getContainersList()) { + infoList.add(unmarshall(container)); + } + return infoList; + } + + public static Messages.ContainerInformationProto marshall(ContainerInformation info) { + + Messages.ContainerInformationProto.Builder builder = + Messages.ContainerInformationProto.newBuilder(); + if (info.containerId != null) { + builder.setContainerId(info.containerId); + } + if (info.component != null) { + builder.setComponent(info.component); + } + if (info.appVersion != null) { + builder.setAppVersion(info.appVersion); + } + builder.setCreateTime(info.createTime); + if (info.diagnostics != null) { + builder.setDiagnostics(info.diagnostics); + } + if (info.host != null) { + builder.setHost(info.host); + } + if (info.hostURL != null) { + builder.setHostURL(info.hostURL); + } + if (info.output != null) { + builder.addAllOutput(Arrays.asList(info.output)); + } + if (info.released != null) { + builder.setReleased(info.released); + } + if (info.placement != null) { + builder.setPlacement(info.placement); + } + builder.setStartTime(info.startTime); + builder.setState(info.state); + return builder.build(); + } + + public static String unmarshall(Messages.WrappedJsonProto wire) { + return wire.getJson(); + } + + public static ConfTree unmarshallToConfTree(Messages.WrappedJsonProto wire) throws + IOException { + return new ConfTreeSerDeser().fromJson(wire.getJson()); + } + + public static ConfTreeOperations unmarshallToCTO(Messages.WrappedJsonProto wire) throws + IOException { + return new ConfTreeOperations(new ConfTreeSerDeser().fromJson(wire.getJson())); + } + + public static AggregateConf unmarshallToAggregateConf(Messages.WrappedJsonProto wire) throws + IOException { + return new AggregateConfSerDeser().fromJson(wire.getJson()); + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/SliderClusterAPI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/SliderClusterAPI.java new file mode 100644 index 00000000000..081b7fa580b --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/proto/SliderClusterAPI.java @@ -0,0 +1,2293 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SliderClusterProtocol.proto + +package org.apache.slider.api.proto; + +public final class SliderClusterAPI { + private SliderClusterAPI() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + /** + * Protobuf service {@code org.apache.slider.api.SliderClusterProtocolPB} + * + *
+   **
+   * Protocol used from between Slider Client and AM
+   * 
+ */ + public static abstract class SliderClusterProtocolPB + implements com.google.protobuf.Service { + protected SliderClusterProtocolPB() {} + + public interface Interface { + /** + * rpc stopCluster(.org.apache.slider.api.StopClusterRequestProto) returns (.org.apache.slider.api.StopClusterResponseProto); + */ + public abstract void stopCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.StopClusterRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc upgradeContainers(.org.apache.slider.api.UpgradeContainersRequestProto) returns (.org.apache.slider.api.UpgradeContainersResponseProto); + * + *
+       **
+       * Upgrade containers 
+       * 
+ */ + public abstract void upgradeContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc flexCluster(.org.apache.slider.api.FlexClusterRequestProto) returns (.org.apache.slider.api.FlexClusterResponseProto); + * + *
+       **
+       * Flex the cluster. 
+       * 
+ */ + public abstract void flexCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.FlexClusterRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getJSONClusterStatus(.org.apache.slider.api.GetJSONClusterStatusRequestProto) returns (.org.apache.slider.api.GetJSONClusterStatusResponseProto); + * + *
+       **
+       * Get the current cluster status
+       * 
+ */ + public abstract void getJSONClusterStatus( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getInstanceDefinition(.org.apache.slider.api.GetInstanceDefinitionRequestProto) returns (.org.apache.slider.api.GetInstanceDefinitionResponseProto); + * + *
+       **
+       * Get the instance definition
+       * 
+ */ + public abstract void getInstanceDefinition( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc listNodeUUIDsByRole(.org.apache.slider.api.ListNodeUUIDsByRoleRequestProto) returns (.org.apache.slider.api.ListNodeUUIDsByRoleResponseProto); + * + *
+       **
+       * List all running nodes in a role
+       * 
+ */ + public abstract void listNodeUUIDsByRole( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getNode(.org.apache.slider.api.GetNodeRequestProto) returns (.org.apache.slider.api.GetNodeResponseProto); + * + *
+       **
+       * Get the details on a node
+       * 
+ */ + public abstract void getNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetNodeRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getClusterNodes(.org.apache.slider.api.GetClusterNodesRequestProto) returns (.org.apache.slider.api.GetClusterNodesResponseProto); + * + *
+       **
+       * Get the 
+       * details on a list of nodes.
+       * Unknown nodes are not returned
+       * <i>Important: the order of the results are undefined</i>
+       * 
+ */ + public abstract void getClusterNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc echo(.org.apache.slider.api.EchoRequestProto) returns (.org.apache.slider.api.EchoResponseProto); + * + *
+       **
+       * echo some text
+       * 
+ */ + public abstract void echo( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EchoRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc killContainer(.org.apache.slider.api.KillContainerRequestProto) returns (.org.apache.slider.api.KillContainerResponseProto); + * + *
+       **
+       * kill a container
+       * 
+ */ + public abstract void killContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.KillContainerRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc amSuicide(.org.apache.slider.api.AMSuicideRequestProto) returns (.org.apache.slider.api.AMSuicideResponseProto); + * + *
+       **
+       * kill the AM
+       * 
+ */ + public abstract void amSuicide( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.AMSuicideRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLivenessInformation(.org.apache.slider.api.GetApplicationLivenessRequestProto) returns (.org.apache.slider.api.ApplicationLivenessInformationProto); + */ + public abstract void getLivenessInformation( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveContainers(.org.apache.slider.api.GetLiveContainersRequestProto) returns (.org.apache.slider.api.GetLiveContainersResponseProto); + */ + public abstract void getLiveContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveContainer(.org.apache.slider.api.GetLiveContainerRequestProto) returns (.org.apache.slider.api.ContainerInformationProto); + */ + public abstract void getLiveContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveComponents(.org.apache.slider.api.GetLiveComponentsRequestProto) returns (.org.apache.slider.api.GetLiveComponentsResponseProto); + */ + public abstract void getLiveComponents( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveComponent(.org.apache.slider.api.GetLiveComponentRequestProto) returns (.org.apache.slider.api.ComponentInformationProto); + */ + public abstract void getLiveComponent( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveNodes(.org.apache.slider.api.GetLiveNodesRequestProto) returns (.org.apache.slider.api.GetLiveNodesResponseProto); + */ + public abstract void getLiveNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveNode(.org.apache.slider.api.GetLiveNodeRequestProto) returns (.org.apache.slider.api.NodeInformationProto); + */ + public abstract void getLiveNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelDesired(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+       * AggregateConf getModelDesired()
+       * 
+ */ + public abstract void getModelDesired( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelDesiredAppconf(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+       * ConfTree getModelDesiredAppconf
+       * 
+ */ + public abstract void getModelDesiredAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelDesiredResources(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+       * ConfTree getModelDesiredResources
+       * 
+ */ + public abstract void getModelDesiredResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelResolved(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+       * AggregateConf getModelResolved()
+       * 
+ */ + public abstract void getModelResolved( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelResolvedAppconf(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+       * ConfTree getModelResolvedAppconf
+       * 
+ */ + public abstract void getModelResolvedAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelResolvedResources(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+       * ConfTree getModelResolvedResources
+       * 
+ */ + public abstract void getModelResolvedResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveResources(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+       * ConfTree getLiveResources
+       * 
+ */ + public abstract void getLiveResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getClientCertificateStore(.org.apache.slider.api.GetCertificateStoreRequestProto) returns (.org.apache.slider.api.GetCertificateStoreResponseProto); + */ + public abstract void getClientCertificateStore( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto request, + com.google.protobuf.RpcCallback done); + + } + + public static com.google.protobuf.Service newReflectiveService( + final Interface impl) { + return new SliderClusterProtocolPB() { + @java.lang.Override + public void stopCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.StopClusterRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.stopCluster(controller, request, done); + } + + @java.lang.Override + public void upgradeContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.upgradeContainers(controller, request, done); + } + + @java.lang.Override + public void flexCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.FlexClusterRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.flexCluster(controller, request, done); + } + + @java.lang.Override + public void getJSONClusterStatus( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getJSONClusterStatus(controller, request, done); + } + + @java.lang.Override + public void getInstanceDefinition( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getInstanceDefinition(controller, request, done); + } + + @java.lang.Override + public void listNodeUUIDsByRole( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.listNodeUUIDsByRole(controller, request, done); + } + + @java.lang.Override + public void getNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetNodeRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getNode(controller, request, done); + } + + @java.lang.Override + public void getClusterNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getClusterNodes(controller, request, done); + } + + @java.lang.Override + public void echo( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EchoRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.echo(controller, request, done); + } + + @java.lang.Override + public void killContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.KillContainerRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.killContainer(controller, request, done); + } + + @java.lang.Override + public void amSuicide( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.AMSuicideRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.amSuicide(controller, request, done); + } + + @java.lang.Override + public void getLivenessInformation( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getLivenessInformation(controller, request, done); + } + + @java.lang.Override + public void getLiveContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getLiveContainers(controller, request, done); + } + + @java.lang.Override + public void getLiveContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getLiveContainer(controller, request, done); + } + + @java.lang.Override + public void getLiveComponents( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getLiveComponents(controller, request, done); + } + + @java.lang.Override + public void getLiveComponent( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getLiveComponent(controller, request, done); + } + + @java.lang.Override + public void getLiveNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getLiveNodes(controller, request, done); + } + + @java.lang.Override + public void getLiveNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getLiveNode(controller, request, done); + } + + @java.lang.Override + public void getModelDesired( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + impl.getModelDesired(controller, request, done); + } + + @java.lang.Override + public void getModelDesiredAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + impl.getModelDesiredAppconf(controller, request, done); + } + + @java.lang.Override + public void getModelDesiredResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + impl.getModelDesiredResources(controller, request, done); + } + + @java.lang.Override + public void getModelResolved( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + impl.getModelResolved(controller, request, done); + } + + @java.lang.Override + public void getModelResolvedAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + impl.getModelResolvedAppconf(controller, request, done); + } + + @java.lang.Override + public void getModelResolvedResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + impl.getModelResolvedResources(controller, request, done); + } + + @java.lang.Override + public void getLiveResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + impl.getLiveResources(controller, request, done); + } + + @java.lang.Override + public void getClientCertificateStore( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto request, + com.google.protobuf.RpcCallback done) { + impl.getClientCertificateStore(controller, request, done); + } + + }; + } + + public static com.google.protobuf.BlockingService + newReflectiveBlockingService(final BlockingInterface impl) { + return new com.google.protobuf.BlockingService() { + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final com.google.protobuf.Message callBlockingMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request) + throws com.google.protobuf.ServiceException { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callBlockingMethod() given method descriptor for " + + "wrong service type."); + } + switch(method.getIndex()) { + case 0: + return impl.stopCluster(controller, (org.apache.slider.api.proto.Messages.StopClusterRequestProto)request); + case 1: + return impl.upgradeContainers(controller, (org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto)request); + case 2: + return impl.flexCluster(controller, (org.apache.slider.api.proto.Messages.FlexClusterRequestProto)request); + case 3: + return impl.getJSONClusterStatus(controller, (org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto)request); + case 4: + return impl.getInstanceDefinition(controller, (org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto)request); + case 5: + return impl.listNodeUUIDsByRole(controller, (org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto)request); + case 6: + return impl.getNode(controller, (org.apache.slider.api.proto.Messages.GetNodeRequestProto)request); + case 7: + return impl.getClusterNodes(controller, (org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto)request); + case 8: + return impl.echo(controller, (org.apache.slider.api.proto.Messages.EchoRequestProto)request); + case 9: + return impl.killContainer(controller, (org.apache.slider.api.proto.Messages.KillContainerRequestProto)request); + case 10: + return impl.amSuicide(controller, (org.apache.slider.api.proto.Messages.AMSuicideRequestProto)request); + case 11: + return impl.getLivenessInformation(controller, (org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto)request); + case 12: + return impl.getLiveContainers(controller, (org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto)request); + case 13: + return impl.getLiveContainer(controller, (org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto)request); + case 14: + return impl.getLiveComponents(controller, (org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto)request); + case 15: + return impl.getLiveComponent(controller, (org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto)request); + case 16: + return impl.getLiveNodes(controller, (org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto)request); + case 17: + return impl.getLiveNode(controller, (org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto)request); + case 18: + return impl.getModelDesired(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request); + case 19: + return impl.getModelDesiredAppconf(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request); + case 20: + return impl.getModelDesiredResources(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request); + case 21: + return impl.getModelResolved(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request); + case 22: + return impl.getModelResolvedAppconf(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request); + case 23: + return impl.getModelResolvedResources(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request); + case 24: + return impl.getLiveResources(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request); + case 25: + return impl.getClientCertificateStore(controller, (org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto)request); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.slider.api.proto.Messages.StopClusterRequestProto.getDefaultInstance(); + case 1: + return org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.getDefaultInstance(); + case 2: + return org.apache.slider.api.proto.Messages.FlexClusterRequestProto.getDefaultInstance(); + case 3: + return org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.getDefaultInstance(); + case 4: + return org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.getDefaultInstance(); + case 5: + return org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.getDefaultInstance(); + case 6: + return org.apache.slider.api.proto.Messages.GetNodeRequestProto.getDefaultInstance(); + case 7: + return org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.getDefaultInstance(); + case 8: + return org.apache.slider.api.proto.Messages.EchoRequestProto.getDefaultInstance(); + case 9: + return org.apache.slider.api.proto.Messages.KillContainerRequestProto.getDefaultInstance(); + case 10: + return org.apache.slider.api.proto.Messages.AMSuicideRequestProto.getDefaultInstance(); + case 11: + return org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.getDefaultInstance(); + case 12: + return org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.getDefaultInstance(); + case 13: + return org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.getDefaultInstance(); + case 14: + return org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.getDefaultInstance(); + case 15: + return org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.getDefaultInstance(); + case 16: + return org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.getDefaultInstance(); + case 17: + return org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.getDefaultInstance(); + case 18: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 19: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 20: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 21: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 22: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 23: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 24: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 25: + return org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.slider.api.proto.Messages.StopClusterResponseProto.getDefaultInstance(); + case 1: + return org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.getDefaultInstance(); + case 2: + return org.apache.slider.api.proto.Messages.FlexClusterResponseProto.getDefaultInstance(); + case 3: + return org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.getDefaultInstance(); + case 4: + return org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.getDefaultInstance(); + case 5: + return org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.getDefaultInstance(); + case 6: + return org.apache.slider.api.proto.Messages.GetNodeResponseProto.getDefaultInstance(); + case 7: + return org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.getDefaultInstance(); + case 8: + return org.apache.slider.api.proto.Messages.EchoResponseProto.getDefaultInstance(); + case 9: + return org.apache.slider.api.proto.Messages.KillContainerResponseProto.getDefaultInstance(); + case 10: + return org.apache.slider.api.proto.Messages.AMSuicideResponseProto.getDefaultInstance(); + case 11: + return org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.getDefaultInstance(); + case 12: + return org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.getDefaultInstance(); + case 13: + return org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance(); + case 14: + return org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.getDefaultInstance(); + case 15: + return org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance(); + case 16: + return org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.getDefaultInstance(); + case 17: + return org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance(); + case 18: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 19: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 20: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 21: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 22: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 23: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 24: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 25: + return org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + }; + } + + /** + * rpc stopCluster(.org.apache.slider.api.StopClusterRequestProto) returns (.org.apache.slider.api.StopClusterResponseProto); + */ + public abstract void stopCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.StopClusterRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc upgradeContainers(.org.apache.slider.api.UpgradeContainersRequestProto) returns (.org.apache.slider.api.UpgradeContainersResponseProto); + * + *
+     **
+     * Upgrade containers 
+     * 
+ */ + public abstract void upgradeContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc flexCluster(.org.apache.slider.api.FlexClusterRequestProto) returns (.org.apache.slider.api.FlexClusterResponseProto); + * + *
+     **
+     * Flex the cluster. 
+     * 
+ */ + public abstract void flexCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.FlexClusterRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getJSONClusterStatus(.org.apache.slider.api.GetJSONClusterStatusRequestProto) returns (.org.apache.slider.api.GetJSONClusterStatusResponseProto); + * + *
+     **
+     * Get the current cluster status
+     * 
+ */ + public abstract void getJSONClusterStatus( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getInstanceDefinition(.org.apache.slider.api.GetInstanceDefinitionRequestProto) returns (.org.apache.slider.api.GetInstanceDefinitionResponseProto); + * + *
+     **
+     * Get the instance definition
+     * 
+ */ + public abstract void getInstanceDefinition( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc listNodeUUIDsByRole(.org.apache.slider.api.ListNodeUUIDsByRoleRequestProto) returns (.org.apache.slider.api.ListNodeUUIDsByRoleResponseProto); + * + *
+     **
+     * List all running nodes in a role
+     * 
+ */ + public abstract void listNodeUUIDsByRole( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getNode(.org.apache.slider.api.GetNodeRequestProto) returns (.org.apache.slider.api.GetNodeResponseProto); + * + *
+     **
+     * Get the details on a node
+     * 
+ */ + public abstract void getNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetNodeRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getClusterNodes(.org.apache.slider.api.GetClusterNodesRequestProto) returns (.org.apache.slider.api.GetClusterNodesResponseProto); + * + *
+     **
+     * Get the 
+     * details on a list of nodes.
+     * Unknown nodes are not returned
+     * <i>Important: the order of the results are undefined</i>
+     * 
+ */ + public abstract void getClusterNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc echo(.org.apache.slider.api.EchoRequestProto) returns (.org.apache.slider.api.EchoResponseProto); + * + *
+     **
+     * echo some text
+     * 
+ */ + public abstract void echo( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EchoRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc killContainer(.org.apache.slider.api.KillContainerRequestProto) returns (.org.apache.slider.api.KillContainerResponseProto); + * + *
+     **
+     * kill a container
+     * 
+ */ + public abstract void killContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.KillContainerRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc amSuicide(.org.apache.slider.api.AMSuicideRequestProto) returns (.org.apache.slider.api.AMSuicideResponseProto); + * + *
+     **
+     * kill the AM
+     * 
+ */ + public abstract void amSuicide( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.AMSuicideRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLivenessInformation(.org.apache.slider.api.GetApplicationLivenessRequestProto) returns (.org.apache.slider.api.ApplicationLivenessInformationProto); + */ + public abstract void getLivenessInformation( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveContainers(.org.apache.slider.api.GetLiveContainersRequestProto) returns (.org.apache.slider.api.GetLiveContainersResponseProto); + */ + public abstract void getLiveContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveContainer(.org.apache.slider.api.GetLiveContainerRequestProto) returns (.org.apache.slider.api.ContainerInformationProto); + */ + public abstract void getLiveContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveComponents(.org.apache.slider.api.GetLiveComponentsRequestProto) returns (.org.apache.slider.api.GetLiveComponentsResponseProto); + */ + public abstract void getLiveComponents( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveComponent(.org.apache.slider.api.GetLiveComponentRequestProto) returns (.org.apache.slider.api.ComponentInformationProto); + */ + public abstract void getLiveComponent( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveNodes(.org.apache.slider.api.GetLiveNodesRequestProto) returns (.org.apache.slider.api.GetLiveNodesResponseProto); + */ + public abstract void getLiveNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveNode(.org.apache.slider.api.GetLiveNodeRequestProto) returns (.org.apache.slider.api.NodeInformationProto); + */ + public abstract void getLiveNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelDesired(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+     * AggregateConf getModelDesired()
+     * 
+ */ + public abstract void getModelDesired( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelDesiredAppconf(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+     * ConfTree getModelDesiredAppconf
+     * 
+ */ + public abstract void getModelDesiredAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelDesiredResources(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+     * ConfTree getModelDesiredResources
+     * 
+ */ + public abstract void getModelDesiredResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelResolved(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+     * AggregateConf getModelResolved()
+     * 
+ */ + public abstract void getModelResolved( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelResolvedAppconf(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+     * ConfTree getModelResolvedAppconf
+     * 
+ */ + public abstract void getModelResolvedAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getModelResolvedResources(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+     * ConfTree getModelResolvedResources
+     * 
+ */ + public abstract void getModelResolvedResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getLiveResources(.org.apache.slider.api.EmptyPayloadProto) returns (.org.apache.slider.api.WrappedJsonProto); + * + *
+     * ConfTree getLiveResources
+     * 
+ */ + public abstract void getLiveResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getClientCertificateStore(.org.apache.slider.api.GetCertificateStoreRequestProto) returns (.org.apache.slider.api.GetCertificateStoreResponseProto); + */ + public abstract void getClientCertificateStore( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto request, + com.google.protobuf.RpcCallback done); + + public static final + com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptor() { + return org.apache.slider.api.proto.SliderClusterAPI.getDescriptor().getServices().get(0); + } + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final void callMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request, + com.google.protobuf.RpcCallback< + com.google.protobuf.Message> done) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callMethod() given method descriptor for wrong " + + "service type."); + } + switch(method.getIndex()) { + case 0: + this.stopCluster(controller, (org.apache.slider.api.proto.Messages.StopClusterRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 1: + this.upgradeContainers(controller, (org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 2: + this.flexCluster(controller, (org.apache.slider.api.proto.Messages.FlexClusterRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 3: + this.getJSONClusterStatus(controller, (org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 4: + this.getInstanceDefinition(controller, (org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 5: + this.listNodeUUIDsByRole(controller, (org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 6: + this.getNode(controller, (org.apache.slider.api.proto.Messages.GetNodeRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 7: + this.getClusterNodes(controller, (org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 8: + this.echo(controller, (org.apache.slider.api.proto.Messages.EchoRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 9: + this.killContainer(controller, (org.apache.slider.api.proto.Messages.KillContainerRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 10: + this.amSuicide(controller, (org.apache.slider.api.proto.Messages.AMSuicideRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 11: + this.getLivenessInformation(controller, (org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 12: + this.getLiveContainers(controller, (org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 13: + this.getLiveContainer(controller, (org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 14: + this.getLiveComponents(controller, (org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 15: + this.getLiveComponent(controller, (org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 16: + this.getLiveNodes(controller, (org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 17: + this.getLiveNode(controller, (org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 18: + this.getModelDesired(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 19: + this.getModelDesiredAppconf(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 20: + this.getModelDesiredResources(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 21: + this.getModelResolved(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 22: + this.getModelResolvedAppconf(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 23: + this.getModelResolvedResources(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 24: + this.getLiveResources(controller, (org.apache.slider.api.proto.Messages.EmptyPayloadProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 25: + this.getClientCertificateStore(controller, (org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.slider.api.proto.Messages.StopClusterRequestProto.getDefaultInstance(); + case 1: + return org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto.getDefaultInstance(); + case 2: + return org.apache.slider.api.proto.Messages.FlexClusterRequestProto.getDefaultInstance(); + case 3: + return org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto.getDefaultInstance(); + case 4: + return org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto.getDefaultInstance(); + case 5: + return org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto.getDefaultInstance(); + case 6: + return org.apache.slider.api.proto.Messages.GetNodeRequestProto.getDefaultInstance(); + case 7: + return org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto.getDefaultInstance(); + case 8: + return org.apache.slider.api.proto.Messages.EchoRequestProto.getDefaultInstance(); + case 9: + return org.apache.slider.api.proto.Messages.KillContainerRequestProto.getDefaultInstance(); + case 10: + return org.apache.slider.api.proto.Messages.AMSuicideRequestProto.getDefaultInstance(); + case 11: + return org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto.getDefaultInstance(); + case 12: + return org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto.getDefaultInstance(); + case 13: + return org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto.getDefaultInstance(); + case 14: + return org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto.getDefaultInstance(); + case 15: + return org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto.getDefaultInstance(); + case 16: + return org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto.getDefaultInstance(); + case 17: + return org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto.getDefaultInstance(); + case 18: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 19: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 20: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 21: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 22: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 23: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 24: + return org.apache.slider.api.proto.Messages.EmptyPayloadProto.getDefaultInstance(); + case 25: + return org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.slider.api.proto.Messages.StopClusterResponseProto.getDefaultInstance(); + case 1: + return org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.getDefaultInstance(); + case 2: + return org.apache.slider.api.proto.Messages.FlexClusterResponseProto.getDefaultInstance(); + case 3: + return org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.getDefaultInstance(); + case 4: + return org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.getDefaultInstance(); + case 5: + return org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.getDefaultInstance(); + case 6: + return org.apache.slider.api.proto.Messages.GetNodeResponseProto.getDefaultInstance(); + case 7: + return org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.getDefaultInstance(); + case 8: + return org.apache.slider.api.proto.Messages.EchoResponseProto.getDefaultInstance(); + case 9: + return org.apache.slider.api.proto.Messages.KillContainerResponseProto.getDefaultInstance(); + case 10: + return org.apache.slider.api.proto.Messages.AMSuicideResponseProto.getDefaultInstance(); + case 11: + return org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.getDefaultInstance(); + case 12: + return org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.getDefaultInstance(); + case 13: + return org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance(); + case 14: + return org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.getDefaultInstance(); + case 15: + return org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance(); + case 16: + return org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.getDefaultInstance(); + case 17: + return org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance(); + case 18: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 19: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 20: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 21: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 22: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 23: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 24: + return org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(); + case 25: + return org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public static Stub newStub( + com.google.protobuf.RpcChannel channel) { + return new Stub(channel); + } + + public static final class Stub extends org.apache.slider.api.proto.SliderClusterAPI.SliderClusterProtocolPB implements Interface { + private Stub(com.google.protobuf.RpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.RpcChannel channel; + + public com.google.protobuf.RpcChannel getChannel() { + return channel; + } + + public void stopCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.StopClusterRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.apache.slider.api.proto.Messages.StopClusterResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.StopClusterResponseProto.class, + org.apache.slider.api.proto.Messages.StopClusterResponseProto.getDefaultInstance())); + } + + public void upgradeContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(1), + controller, + request, + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.class, + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.getDefaultInstance())); + } + + public void flexCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.FlexClusterRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(2), + controller, + request, + org.apache.slider.api.proto.Messages.FlexClusterResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.FlexClusterResponseProto.class, + org.apache.slider.api.proto.Messages.FlexClusterResponseProto.getDefaultInstance())); + } + + public void getJSONClusterStatus( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(3), + controller, + request, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.class, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.getDefaultInstance())); + } + + public void getInstanceDefinition( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(4), + controller, + request, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.class, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.getDefaultInstance())); + } + + public void listNodeUUIDsByRole( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(5), + controller, + request, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.class, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.getDefaultInstance())); + } + + public void getNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetNodeRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(6), + controller, + request, + org.apache.slider.api.proto.Messages.GetNodeResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.GetNodeResponseProto.class, + org.apache.slider.api.proto.Messages.GetNodeResponseProto.getDefaultInstance())); + } + + public void getClusterNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(7), + controller, + request, + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.class, + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.getDefaultInstance())); + } + + public void echo( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EchoRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(8), + controller, + request, + org.apache.slider.api.proto.Messages.EchoResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.EchoResponseProto.class, + org.apache.slider.api.proto.Messages.EchoResponseProto.getDefaultInstance())); + } + + public void killContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.KillContainerRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(9), + controller, + request, + org.apache.slider.api.proto.Messages.KillContainerResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.KillContainerResponseProto.class, + org.apache.slider.api.proto.Messages.KillContainerResponseProto.getDefaultInstance())); + } + + public void amSuicide( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.AMSuicideRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(10), + controller, + request, + org.apache.slider.api.proto.Messages.AMSuicideResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.AMSuicideResponseProto.class, + org.apache.slider.api.proto.Messages.AMSuicideResponseProto.getDefaultInstance())); + } + + public void getLivenessInformation( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(11), + controller, + request, + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.class, + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.getDefaultInstance())); + } + + public void getLiveContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(12), + controller, + request, + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.class, + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.getDefaultInstance())); + } + + public void getLiveContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(13), + controller, + request, + org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.ContainerInformationProto.class, + org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance())); + } + + public void getLiveComponents( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(14), + controller, + request, + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.class, + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.getDefaultInstance())); + } + + public void getLiveComponent( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(15), + controller, + request, + org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.ComponentInformationProto.class, + org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance())); + } + + public void getLiveNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(16), + controller, + request, + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.class, + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.getDefaultInstance())); + } + + public void getLiveNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(17), + controller, + request, + org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.NodeInformationProto.class, + org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance())); + } + + public void getModelDesired( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(18), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance())); + } + + public void getModelDesiredAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(19), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance())); + } + + public void getModelDesiredResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(20), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance())); + } + + public void getModelResolved( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(21), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance())); + } + + public void getModelResolvedAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(22), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance())); + } + + public void getModelResolvedResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(23), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance())); + } + + public void getLiveResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(24), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.WrappedJsonProto.class, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance())); + } + + public void getClientCertificateStore( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(25), + controller, + request, + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.class, + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.getDefaultInstance())); + } + } + + public static BlockingInterface newBlockingStub( + com.google.protobuf.BlockingRpcChannel channel) { + return new BlockingStub(channel); + } + + public interface BlockingInterface { + public org.apache.slider.api.proto.Messages.StopClusterResponseProto stopCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.StopClusterRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto upgradeContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.FlexClusterResponseProto flexCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.FlexClusterRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto getJSONClusterStatus( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto getInstanceDefinition( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto listNodeUUIDsByRole( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.GetNodeResponseProto getNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetNodeRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto getClusterNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.EchoResponseProto echo( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EchoRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.KillContainerResponseProto killContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.KillContainerRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.AMSuicideResponseProto amSuicide( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.AMSuicideRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto getLivenessInformation( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto getLiveContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.ContainerInformationProto getLiveContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto getLiveComponents( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.ComponentInformationProto getLiveComponent( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto getLiveNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.NodeInformationProto getLiveNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelDesired( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelDesiredAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelDesiredResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelResolved( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelResolvedAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelResolvedResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getLiveResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException; + + public org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto getClientCertificateStore( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto request) + throws com.google.protobuf.ServiceException; + } + + private static final class BlockingStub implements BlockingInterface { + private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.BlockingRpcChannel channel; + + public org.apache.slider.api.proto.Messages.StopClusterResponseProto stopCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.StopClusterRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.StopClusterResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.apache.slider.api.proto.Messages.StopClusterResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto upgradeContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.UpgradeContainersRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(1), + controller, + request, + org.apache.slider.api.proto.Messages.UpgradeContainersResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.FlexClusterResponseProto flexCluster( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.FlexClusterRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.FlexClusterResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(2), + controller, + request, + org.apache.slider.api.proto.Messages.FlexClusterResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto getJSONClusterStatus( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(3), + controller, + request, + org.apache.slider.api.proto.Messages.GetJSONClusterStatusResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto getInstanceDefinition( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(4), + controller, + request, + org.apache.slider.api.proto.Messages.GetInstanceDefinitionResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto listNodeUUIDsByRole( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(5), + controller, + request, + org.apache.slider.api.proto.Messages.ListNodeUUIDsByRoleResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.GetNodeResponseProto getNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetNodeRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.GetNodeResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(6), + controller, + request, + org.apache.slider.api.proto.Messages.GetNodeResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto getClusterNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetClusterNodesRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(7), + controller, + request, + org.apache.slider.api.proto.Messages.GetClusterNodesResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.EchoResponseProto echo( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EchoRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.EchoResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(8), + controller, + request, + org.apache.slider.api.proto.Messages.EchoResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.KillContainerResponseProto killContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.KillContainerRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.KillContainerResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(9), + controller, + request, + org.apache.slider.api.proto.Messages.KillContainerResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.AMSuicideResponseProto amSuicide( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.AMSuicideRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.AMSuicideResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(10), + controller, + request, + org.apache.slider.api.proto.Messages.AMSuicideResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto getLivenessInformation( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetApplicationLivenessRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(11), + controller, + request, + org.apache.slider.api.proto.Messages.ApplicationLivenessInformationProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto getLiveContainers( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainersRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(12), + controller, + request, + org.apache.slider.api.proto.Messages.GetLiveContainersResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.ContainerInformationProto getLiveContainer( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveContainerRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.ContainerInformationProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(13), + controller, + request, + org.apache.slider.api.proto.Messages.ContainerInformationProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto getLiveComponents( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentsRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(14), + controller, + request, + org.apache.slider.api.proto.Messages.GetLiveComponentsResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.ComponentInformationProto getLiveComponent( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveComponentRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.ComponentInformationProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(15), + controller, + request, + org.apache.slider.api.proto.Messages.ComponentInformationProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto getLiveNodes( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodesRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(16), + controller, + request, + org.apache.slider.api.proto.Messages.GetLiveNodesResponseProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.NodeInformationProto getLiveNode( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetLiveNodeRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.NodeInformationProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(17), + controller, + request, + org.apache.slider.api.proto.Messages.NodeInformationProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelDesired( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.WrappedJsonProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(18), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelDesiredAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.WrappedJsonProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(19), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelDesiredResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.WrappedJsonProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(20), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelResolved( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.WrappedJsonProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(21), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelResolvedAppconf( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.WrappedJsonProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(22), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getModelResolvedResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.WrappedJsonProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(23), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.WrappedJsonProto getLiveResources( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.EmptyPayloadProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.WrappedJsonProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(24), + controller, + request, + org.apache.slider.api.proto.Messages.WrappedJsonProto.getDefaultInstance()); + } + + + public org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto getClientCertificateStore( + com.google.protobuf.RpcController controller, + org.apache.slider.api.proto.Messages.GetCertificateStoreRequestProto request) + throws com.google.protobuf.ServiceException { + return (org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto) channel.callBlockingMethod( + getDescriptor().getMethods().get(25), + controller, + request, + org.apache.slider.api.proto.Messages.GetCertificateStoreResponseProto.getDefaultInstance()); + } + + } + + // @@protoc_insertion_point(class_scope:org.apache.slider.api.SliderClusterProtocolPB) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\033SliderClusterProtocol.proto\022\025org.apach" + + "e.slider.api\032\033SliderClusterMessages.prot" + + "o2\245\030\n\027SliderClusterProtocolPB\022n\n\013stopClu" + + "ster\022..org.apache.slider.api.StopCluster" + + "RequestProto\032/.org.apache.slider.api.Sto" + + "pClusterResponseProto\022\200\001\n\021upgradeContain" + + "ers\0224.org.apache.slider.api.UpgradeConta" + + "inersRequestProto\0325.org.apache.slider.ap" + + "i.UpgradeContainersResponseProto\022n\n\013flex" + + "Cluster\022..org.apache.slider.api.FlexClus", + "terRequestProto\032/.org.apache.slider.api." + + "FlexClusterResponseProto\022\211\001\n\024getJSONClus" + + "terStatus\0227.org.apache.slider.api.GetJSO" + + "NClusterStatusRequestProto\0328.org.apache." + + "slider.api.GetJSONClusterStatusResponseP" + + "roto\022\214\001\n\025getInstanceDefinition\0228.org.apa" + + "che.slider.api.GetInstanceDefinitionRequ" + + "estProto\0329.org.apache.slider.api.GetInst" + + "anceDefinitionResponseProto\022\206\001\n\023listNode" + + "UUIDsByRole\0226.org.apache.slider.api.List", + "NodeUUIDsByRoleRequestProto\0327.org.apache" + + ".slider.api.ListNodeUUIDsByRoleResponseP" + + "roto\022b\n\007getNode\022*.org.apache.slider.api." + + "GetNodeRequestProto\032+.org.apache.slider." + + "api.GetNodeResponseProto\022z\n\017getClusterNo" + + "des\0222.org.apache.slider.api.GetClusterNo" + + "desRequestProto\0323.org.apache.slider.api." + + "GetClusterNodesResponseProto\022Y\n\004echo\022\'.o" + + "rg.apache.slider.api.EchoRequestProto\032(." + + "org.apache.slider.api.EchoResponseProto\022", + "t\n\rkillContainer\0220.org.apache.slider.api" + + ".KillContainerRequestProto\0321.org.apache." + + "slider.api.KillContainerResponseProto\022h\n" + + "\tamSuicide\022,.org.apache.slider.api.AMSui" + + "cideRequestProto\032-.org.apache.slider.api" + + ".AMSuicideResponseProto\022\217\001\n\026getLivenessI" + + "nformation\0229.org.apache.slider.api.GetAp" + + "plicationLivenessRequestProto\032:.org.apac" + + "he.slider.api.ApplicationLivenessInforma" + + "tionProto\022\200\001\n\021getLiveContainers\0224.org.ap", + "ache.slider.api.GetLiveContainersRequest" + + "Proto\0325.org.apache.slider.api.GetLiveCon" + + "tainersResponseProto\022y\n\020getLiveContainer" + + "\0223.org.apache.slider.api.GetLiveContaine" + + "rRequestProto\0320.org.apache.slider.api.Co" + + "ntainerInformationProto\022\200\001\n\021getLiveCompo" + + "nents\0224.org.apache.slider.api.GetLiveCom" + + "ponentsRequestProto\0325.org.apache.slider." + + "api.GetLiveComponentsResponseProto\022y\n\020ge" + + "tLiveComponent\0223.org.apache.slider.api.G", + "etLiveComponentRequestProto\0320.org.apache" + + ".slider.api.ComponentInformationProto\022q\n" + + "\014getLiveNodes\022/.org.apache.slider.api.Ge" + + "tLiveNodesRequestProto\0320.org.apache.slid" + + "er.api.GetLiveNodesResponseProto\022j\n\013getL" + + "iveNode\022..org.apache.slider.api.GetLiveN" + + "odeRequestProto\032+.org.apache.slider.api." + + "NodeInformationProto\022d\n\017getModelDesired\022" + + "(.org.apache.slider.api.EmptyPayloadProt" + + "o\032\'.org.apache.slider.api.WrappedJsonPro", + "to\022k\n\026getModelDesiredAppconf\022(.org.apach" + + "e.slider.api.EmptyPayloadProto\032\'.org.apa" + + "che.slider.api.WrappedJsonProto\022m\n\030getMo" + + "delDesiredResources\022(.org.apache.slider." + + "api.EmptyPayloadProto\032\'.org.apache.slide" + + "r.api.WrappedJsonProto\022e\n\020getModelResolv" + + "ed\022(.org.apache.slider.api.EmptyPayloadP" + + "roto\032\'.org.apache.slider.api.WrappedJson" + + "Proto\022l\n\027getModelResolvedAppconf\022(.org.a" + + "pache.slider.api.EmptyPayloadProto\032\'.org", + ".apache.slider.api.WrappedJsonProto\022n\n\031g" + + "etModelResolvedResources\022(.org.apache.sl" + + "ider.api.EmptyPayloadProto\032\'.org.apache." + + "slider.api.WrappedJsonProto\022e\n\020getLiveRe" + + "sources\022(.org.apache.slider.api.EmptyPay" + + "loadProto\032\'.org.apache.slider.api.Wrappe" + + "dJsonProto\022\214\001\n\031getClientCertificateStore" + + "\0226.org.apache.slider.api.GetCertificateS" + + "toreRequestProto\0327.org.apache.slider.api" + + ".GetCertificateStoreResponseProtoB5\n\033org", + ".apache.slider.api.protoB\020SliderClusterA" + + "PI\210\001\001\240\001\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.apache.slider.api.proto.Messages.getDescriptor(), + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ApplicationLivenessInformation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ApplicationLivenessInformation.java new file mode 100644 index 00000000000..9879d053df8 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ApplicationLivenessInformation.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +/** + * Serialized information about liveness + *

+ * If true liveness probes are implemented, this + * datatype can be extended to publish their details. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +public class ApplicationLivenessInformation { + /** flag set if the cluster is at size */ + public boolean allRequestsSatisfied; + + /** number of outstanding requests: those needed to satisfy */ + public int requestsOutstanding; + + /** number of requests submitted to YARN */ + public int activeRequests; + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder("ApplicationLivenessInformation{"); + sb.append("allRequestsSatisfied=").append(allRequestsSatisfied); + sb.append(", requestsOutstanding=").append(requestsOutstanding); + sb.append('}'); + return sb.toString(); + } +} + + diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ComponentInformation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ComponentInformation.java new file mode 100644 index 00000000000..c46a59f911c --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ComponentInformation.java @@ -0,0 +1,107 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.apache.slider.api.StatusKeys; +import org.apache.slider.server.appmaster.state.RoleStatus; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Serializable version of component data. + *

+ * This is sent in REST calls as a JSON object —but is also marshalled into + * a protobuf structure. Look at {@link org.apache.slider.api.proto.RestTypeMarshalling} + * for the specifics there. + *

+ * This means that if any fields are added here. they must be added to + * src/main/proto/SliderClusterMessages.proto and + * the protobuf structures rebuilt via a {@code mvn generate-sources -Pcompile-protobuf} + * + * See also {@link RoleStatus#serialize()} + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) + +public class ComponentInformation { + + public String name; + public int priority; + public int desired, actual, releasing; + public int placementPolicy; + public int requested; + public int failed, started, startFailed, completed, totalRequested; + public int nodeFailed, failedRecently, preempted; + public int pendingAntiAffineRequestCount; + public boolean isAARequestOutstanding; + + public String failureMessage; + public List containers; + + /** + * Build the statistics map from the current data + * @return a map for use in statistics reports + */ + public Map buildStatistics() { + Map stats = new HashMap<>(); + stats.put(StatusKeys.STATISTICS_CONTAINERS_ACTIVE_REQUESTS, requested); + stats.put(StatusKeys.STATISTICS_CONTAINERS_ANTI_AFFINE_PENDING, pendingAntiAffineRequestCount); + stats.put(StatusKeys.STATISTICS_CONTAINERS_COMPLETED, completed); + stats.put(StatusKeys.STATISTICS_CONTAINERS_DESIRED, desired); + stats.put(StatusKeys.STATISTICS_CONTAINERS_FAILED, failed); + stats.put(StatusKeys.STATISTICS_CONTAINERS_FAILED_NODE, nodeFailed); + stats.put(StatusKeys.STATISTICS_CONTAINERS_FAILED_RECENTLY, failedRecently); + stats.put(StatusKeys.STATISTICS_CONTAINERS_LIVE, actual); + stats.put(StatusKeys.STATISTICS_CONTAINERS_PREEMPTED, preempted); + stats.put(StatusKeys.STATISTICS_CONTAINERS_REQUESTED, totalRequested); + stats.put(StatusKeys.STATISTICS_CONTAINERS_STARTED, started); + stats.put(StatusKeys.STATISTICS_CONTAINERS_START_FAILED, startFailed); + return stats; + } + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder("ComponentInformation{"); + sb.append(", name='").append(name).append('\''); + sb.append(", actual=").append(actual); + sb.append(", completed=").append(completed); + sb.append(", desired=").append(desired); + sb.append(", failed=").append(failed); + sb.append(", failureMessage='").append(failureMessage).append('\''); + sb.append(", placementPolicy=").append(placementPolicy); + sb.append(", isAARequestOutstanding=").append(isAARequestOutstanding); + sb.append(", pendingAntiAffineRequestCount=").append(pendingAntiAffineRequestCount); + sb.append(", priority=").append(priority); + sb.append(", releasing=").append(releasing); + sb.append(", requested=").append(requested); + sb.append(", started=").append(started); + sb.append(", startFailed=").append(startFailed); + sb.append(", totalRequested=").append(totalRequested); + sb.append(", container count='") + .append(containers == null ? 0 : containers.size()) + .append('\''); + sb.append('}'); + return sb.toString(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ContainerInformation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ContainerInformation.java new file mode 100644 index 00000000000..69913404239 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/ContainerInformation.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.apache.hadoop.registry.client.binding.JsonSerDeser; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +/** + * Serializable version of component instance data + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +public class ContainerInformation { + + public String containerId; + public String component; + public String appVersion; + public Boolean released; + public int state; + public Integer exitCode; + public String diagnostics; + public long createTime; + public long startTime; + + public String host; + public String hostURL; + public String placement; + /** + * What is the tail output from the executed process (or [] if not started + * or the log cannot be picked up + */ + public String[] output; + + @Override + public String toString() { + JsonSerDeser serDeser = + new JsonSerDeser<>( + ContainerInformation.class); + return serDeser.toString(this); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeEntryInformation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeEntryInformation.java new file mode 100644 index 00000000000..8424be23132 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeEntryInformation.java @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +/** + * Serialized node entry information. Must be kept in sync with the protobuf equivalent. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +public class NodeEntryInformation { + + /** incrementing counter of instances that failed */ + public int failed; + + /** Counter of "failed recently" events. */ + public int failedRecently; + + /** timestamp of last use */ + public long lastUsed; + + /** Number of live nodes. */ + public int live; + + /** incrementing counter of instances that have been pre-empted. */ + public int preempted; + + /** Priority */ + public int priority; + + /** instance explicitly requested on this node */ + public int requested; + + /** number of containers being released off this node */ + public int releasing; + + /** incrementing counter of instances that failed to start */ + public int startFailed; + + /** number of starting instances */ + public int starting; + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder( + "NodeEntryInformation{"); + sb.append("priority=").append(priority); + sb.append(", live=").append(live); + sb.append(", requested=").append(requested); + sb.append(", releasing=").append(releasing); + sb.append(", starting=").append(starting); + sb.append(", failed=").append(failed); + sb.append(", failedRecently=").append(failedRecently); + sb.append(", startFailed=").append(startFailed); + sb.append(", preempted=").append(preempted); + sb.append(", lastUsed=").append(lastUsed); + sb.append('}'); + return sb.toString(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeInformation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeInformation.java new file mode 100644 index 00000000000..4fe5b4c4af7 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeInformation.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Serialized node information. Must be kept in sync with the protobuf equivalent. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +public class NodeInformation { + + public String hostname; + public String state; + public String labels; + public String rackName; + public String httpAddress; + public String healthReport; + public long lastUpdated; + public Map entries = new HashMap<>(); + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder( + "NodeInformation{"); + sb.append("hostname='").append(hostname).append('\''); + sb.append(", state='").append(state).append('\''); + sb.append(", labels='").append(labels).append('\''); + sb.append(", rackName='").append(rackName).append('\''); + sb.append(", httpAddress='").append(httpAddress).append('\''); + sb.append(", healthReport='").append(healthReport).append('\''); + sb.append(", lastUpdated=").append(lastUpdated); + sb.append('}'); + return sb.toString(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeInformationList.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeInformationList.java new file mode 100644 index 00000000000..741523e64bc --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/NodeInformationList.java @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.apache.slider.core.persist.JsonSerDeser; + +import java.util.ArrayList; +import java.util.Collection; + +public class NodeInformationList extends ArrayList { + public NodeInformationList() { + } + + public NodeInformationList(Collection c) { + super(c); + } + + public NodeInformationList(int initialCapacity) { + super(initialCapacity); + } + + public static JsonSerDeser createSerializer() { + return new JsonSerDeser<>(NodeInformationList.class); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/PingInformation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/PingInformation.java new file mode 100644 index 00000000000..223edcacab6 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/PingInformation.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; + +/** + * Serialized information to/from Ping operations + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +public class PingInformation { + public long time; + public String text; + public String verb; + public String body; + + @Override + public String toString() { + + final StringBuilder sb = + new StringBuilder("PingResource{"); + sb.append("time=").append(time); + sb.append(", verb=").append(verb); + sb.append(", text='").append(text).append('\''); + sb.append(", body='").append(body).append('\''); + sb.append('}'); + return sb.toString(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/RoleStatistics.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/RoleStatistics.java new file mode 100644 index 00000000000..c926600d84a --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/RoleStatistics.java @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; + +/** + * Simple role statistics for state views; can be generated by RoleStatus + * instances, and aggregated for summary information. + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class RoleStatistics { + public long activeAA = 0L; + public long actual = 0L; + public long completed = 0L; + public long desired = 0L; + public long failed = 0L; + public long failedRecently = 0L; + public long limitsExceeded = 0L; + public long nodeFailed = 0L; + public long preempted = 0L; + public long releasing = 0L; + public long requested = 0L; + public long started = 0L; + public long startFailed = 0L; + public long totalRequested = 0L; + + /** + * Add another statistics instance + * @param that the other value + * @return this entry + */ + public RoleStatistics add(final RoleStatistics that) { + activeAA += that.activeAA; + actual += that.actual; + completed += that.completed; + desired += that.desired; + failed += that.failed; + failedRecently += that.failedRecently; + limitsExceeded += that.limitsExceeded; + nodeFailed += that.nodeFailed; + preempted += that.preempted; + releasing += that.releasing; + requested += that.requested; + started += that.started; + startFailed += that.totalRequested; + totalRequested += that.totalRequested; + return this; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/SliderInstanceDescription.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/SliderInstanceDescription.java new file mode 100644 index 00000000000..3b95f8044a7 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/api/types/SliderInstanceDescription.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.api.types; + +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.yarn.api.records.ApplicationReport; + +/** + * Description of a slider instance + */ +public class SliderInstanceDescription { + + public final String name; + public final Path path; + public final ApplicationReport applicationReport; + + public SliderInstanceDescription(String name, + Path path, + ApplicationReport applicationReport) { + this.name = name; + this.path = path; + this.applicationReport = applicationReport; + } + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder("SliderInstanceDescription{"); + sb.append("name='").append(name).append('\''); + sb.append(", path=").append(path); + sb.append(", applicationReport: ") + .append(applicationReport == null + ? "null" + : (" id " + applicationReport.getApplicationId())); + sb.append('}'); + return sb.toString(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ClientRegistryBinder.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ClientRegistryBinder.java new file mode 100644 index 00000000000..da37d1171ca --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ClientRegistryBinder.java @@ -0,0 +1,201 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client; + +import com.google.common.base.Preconditions; +import org.apache.hadoop.fs.PathNotFoundException; +import org.apache.hadoop.registry.client.api.RegistryConstants; +import org.apache.hadoop.registry.client.api.RegistryOperations; +import org.apache.hadoop.registry.client.binding.RegistryPathUtils; +import org.apache.hadoop.registry.client.binding.RegistryTypeUtils; +import org.apache.hadoop.registry.client.exceptions.InvalidRecordException; +import org.apache.hadoop.registry.client.impl.zk.RegistryInternalConstants; +import org.apache.hadoop.registry.client.types.Endpoint; +import org.apache.hadoop.registry.client.types.ServiceRecord; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.List; + +import static org.apache.hadoop.registry.client.binding.RegistryPathUtils.encodeForRegistry; +import static org.apache.hadoop.registry.client.binding.RegistryUtils.convertUsername; +import static org.apache.hadoop.registry.client.binding.RegistryUtils.getCurrentUsernameUnencoded; +import static org.apache.hadoop.registry.client.binding.RegistryUtils.servicePath; + +/** + * Generic code to get the URLs for clients via the registry + */ +public class ClientRegistryBinder { + private static final Logger log = + LoggerFactory.getLogger(ClientRegistryBinder.class); + + private final RegistryOperations operations; + + public ClientRegistryBinder(RegistryOperations operations) { + this.operations = operations; + } + + /** + * Buld the user path -switches to the system path if the user is "". + * It also cross-converts the username to ascii via punycode + * @param username username or "" + * @return the path to the user + */ + public static String homePathForUser(String username) { + Preconditions.checkArgument(username != null, "null user"); + + // catch recursion + if (username.startsWith(RegistryConstants.PATH_USERS)) { + return username; + } + + if (username.isEmpty()) { + return RegistryConstants.PATH_SYSTEM_SERVICES; + } + + // convert username to registry name + String convertedName = convertUsername(username); + + return RegistryPathUtils.join(RegistryConstants.PATH_USERS, + encodeForRegistry(convertedName)); + } + + /** + * Get the current username, before any encoding has been applied. + * @return the current user from the kerberos identity, falling back + * to the user and/or env variables. + */ + public static String currentUsernameUnencoded() { + String env_hadoop_username = System.getenv( + RegistryInternalConstants.HADOOP_USER_NAME); + return getCurrentUsernameUnencoded(env_hadoop_username); + } + + /** + * Qualify a user. + *

    + *
  1. "~" maps to user home path home
  2. + *
  3. "~user" maps to /users/$user
  4. + *
  5. "/" maps to /services/
  6. + *
+ * @param user the username + * @return the base path + */ + public static String qualifyUser(String user) { + // qualify the user + String t = user.trim(); + if (t.startsWith("/")) { + // already resolved + return t; + } else if (t.equals("~")) { + // self + return currentUsernameUnencoded(); + } else if (t.startsWith("~")) { + // another user + // convert username to registry name + String convertedName = convertUsername(t.substring(1)); + + return RegistryPathUtils.join(RegistryConstants.PATH_USERS, + encodeForRegistry(convertedName)); + } else { + return "/" + t; + } + } + + /** + * Look up an external REST API + * @param user user which will be qualified as per {@link #qualifyUser(String)} + * @param serviceClass service class + * @param instance instance name + * @param api API + * @return the API, or an exception is raised. + * @throws IOException + */ + public String lookupExternalRestAPI(String user, + String serviceClass, + String instance, + String api) + throws IOException { + String qualified = qualifyUser(user); + String path = servicePath(qualified, serviceClass, instance); + String restAPI = resolveExternalRestAPI(api, path); + if (restAPI == null) { + throw new PathNotFoundException(path + " API " + api); + } + return restAPI; + } + + /** + * Resolve a service record then return an external REST API exported it. + * + * @param api API to resolve + * @param path path of the service record + * @return null if the record exists but the API is absent or it has no + * REST endpoints. + * @throws IOException resolution problems, as covered in + * {@link RegistryOperations#resolve(String)} + */ + protected String resolveExternalRestAPI(String api, String path) throws + IOException { + ServiceRecord record = operations.resolve(path); + return lookupRestAPI(record, api, true); + } + + /** + * Look up an external REST API endpoint + * @param record service record + * @param api URI of api + * @param external flag to indicate this is an external record + * @return the first endpoint of the implementation, or null if there + * is no entry for the API, implementation or it's the wrong type. + */ + public static String lookupRestAPI(ServiceRecord record, + String api, boolean external) throws InvalidRecordException { + try { + String url = null; + Endpoint endpoint = getEndpoint(record, api, external); + List addresses = + RegistryTypeUtils.retrieveAddressesUriType(endpoint); + if (addresses != null && !addresses.isEmpty()) { + url = addresses.get(0); + } + return url; + } catch (InvalidRecordException e) { + log.debug("looking for API {}", api, e); + return null; + } + } + + /** + * Get an endpont by API + * @param record service record + * @param api API + * @param external flag to indicate this is an external record + * @return the endpoint or null + */ + public static Endpoint getEndpoint(ServiceRecord record, + String api, + boolean external) { + return external ? record.getExternalEndpoint(api) + : record.getInternalEndpoint(api); + } + + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ClientUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ClientUtils.java new file mode 100644 index 00000000000..c3ccb1dd083 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ClientUtils.java @@ -0,0 +1,111 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.slider.client; + +import org.apache.commons.lang.StringUtils; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.PathNotFoundException; +import org.apache.hadoop.registry.client.api.RegistryOperations; +import org.apache.hadoop.registry.client.binding.RegistryPathUtils; +import org.apache.hadoop.registry.client.exceptions.NoRecordException; +import org.apache.hadoop.registry.client.types.ServiceRecord; +import org.apache.slider.common.SliderKeys; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.NotFoundException; +import org.apache.slider.core.exceptions.SliderException; +import org.apache.slider.core.registry.docstore.ConfigFormat; +import org.apache.slider.core.registry.docstore.PublishedConfigSet; +import org.apache.slider.core.registry.docstore.PublishedConfiguration; +import org.apache.slider.core.registry.docstore.PublishedConfigurationOutputter; +import org.apache.slider.core.registry.retrieve.RegistryRetriever; + +import java.io.File; +import java.io.IOException; + +import static org.apache.hadoop.registry.client.binding.RegistryUtils.currentUser; +import static org.apache.hadoop.registry.client.binding.RegistryUtils.servicePath; + +public class ClientUtils { + public static ServiceRecord lookupServiceRecord(RegistryOperations rops, + String user, String name) throws IOException, SliderException { + return lookupServiceRecord(rops, user, null, name); + } + + public static ServiceRecord lookupServiceRecord(RegistryOperations rops, + String user, String type, String name) throws IOException, + SliderException { + if (StringUtils.isEmpty(user)) { + user = currentUser(); + } else { + user = RegistryPathUtils.encodeForRegistry(user); + } + if (StringUtils.isEmpty(type)) { + type = SliderKeys.APP_TYPE; + } + + String path = servicePath(user, type, name); + return resolve(rops, path); + } + + public static ServiceRecord resolve(RegistryOperations rops, String path) + throws IOException, SliderException { + try { + return rops.resolve(path); + } catch (PathNotFoundException | NoRecordException e) { + throw new NotFoundException(e.getPath().toString(), e); + } + } + + public static PublishedConfiguration getConfigFromRegistry( + RegistryOperations rops, Configuration configuration, + String configName, String appName, String user, boolean external) + throws IOException, SliderException { + ServiceRecord instance = lookupServiceRecord(rops, user, appName); + + RegistryRetriever retriever = new RegistryRetriever(configuration, instance); + PublishedConfigSet configurations = retriever.getConfigurations(external); + + PublishedConfiguration published = retriever.retrieveConfiguration( + configurations, configName, external); + return published; + } + + public static String saveOrReturnConfig(PublishedConfiguration published, + String format, File destPath, String fileName) + throws BadCommandArgumentsException, IOException { + ConfigFormat configFormat = ConfigFormat.resolve(format); + if (configFormat == null) { + throw new BadCommandArgumentsException( + "Unknown/Unsupported format %s ", format); + } + PublishedConfigurationOutputter outputter = + PublishedConfigurationOutputter.createOutputter(configFormat, + published); + boolean print = destPath == null; + if (!print) { + if (destPath.isDirectory()) { + // creating it under a directory + destPath = new File(destPath, fileName); + } + outputter.save(destPath); + return null; + } else { + return outputter.asString(); + } + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderClient.java new file mode 100644 index 00000000000..8210f4df2e1 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderClient.java @@ -0,0 +1,4569 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. +*/ + +package org.apache.slider.client; + +import com.google.common.annotations.VisibleForTesting; +import com.google.common.io.Files; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.LocatedFileStatus; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.fs.PathNotFoundException; +import org.apache.hadoop.fs.RemoteIterator; +import org.apache.hadoop.fs.permission.FsAction; +import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.hdfs.HdfsConfiguration; +import org.apache.hadoop.net.NetUtils; +import org.apache.hadoop.registry.client.api.RegistryConstants; +import org.apache.hadoop.registry.client.api.RegistryOperations; +import org.apache.hadoop.registry.client.binding.RegistryPathUtils; +import org.apache.hadoop.registry.client.binding.RegistryUtils; +import org.apache.hadoop.registry.client.exceptions.NoRecordException; +import org.apache.hadoop.registry.client.types.Endpoint; +import org.apache.hadoop.registry.client.types.RegistryPathStatus; +import org.apache.hadoop.registry.client.types.ServiceRecord; +import org.apache.hadoop.registry.client.types.yarn.YarnRegistryAttributes; +import org.apache.hadoop.security.Credentials; +import org.apache.hadoop.security.KerberosDiags; +import org.apache.hadoop.security.UserGroupInformation; +import org.apache.hadoop.security.alias.CredentialProvider; +import org.apache.hadoop.security.alias.CredentialProviderFactory; +import org.apache.hadoop.util.Shell; +import org.apache.hadoop.yarn.api.ApplicationConstants; +import org.apache.hadoop.yarn.api.records.ApplicationId; +import org.apache.hadoop.yarn.api.records.ApplicationReport; +import org.apache.hadoop.yarn.api.records.FinalApplicationStatus; +import org.apache.hadoop.yarn.api.records.LocalResource; +import org.apache.hadoop.yarn.api.records.NodeReport; +import org.apache.hadoop.yarn.api.records.NodeState; +import org.apache.hadoop.yarn.api.records.YarnApplicationState; +import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.apache.hadoop.yarn.exceptions.ApplicationAttemptNotFoundException; +import org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException; +import org.apache.hadoop.yarn.exceptions.YarnException; +import org.apache.hadoop.yarn.util.ConverterUtils; +import org.apache.slider.api.ClusterDescription; +import org.apache.slider.api.ClusterNode; +import org.apache.slider.api.SliderApplicationApi; +import org.apache.slider.api.SliderClusterProtocol; +import org.apache.slider.api.StateValues; +import org.apache.slider.api.proto.Messages; +import org.apache.slider.api.types.ContainerInformation; +import org.apache.slider.api.types.NodeInformationList; +import org.apache.slider.api.types.SliderInstanceDescription; +import org.apache.slider.client.ipc.SliderApplicationIpcClient; +import org.apache.slider.client.ipc.SliderClusterOperations; +import org.apache.slider.common.Constants; +import org.apache.slider.common.SliderExitCodes; +import org.apache.slider.common.SliderKeys; +import org.apache.slider.common.params.AbstractActionArgs; +import org.apache.slider.common.params.AbstractClusterBuildingActionArgs; +import org.apache.slider.common.params.ActionAMSuicideArgs; +import org.apache.slider.common.params.ActionClientArgs; +import org.apache.slider.common.params.ActionCreateArgs; +import org.apache.slider.common.params.ActionDependencyArgs; +import org.apache.slider.common.params.ActionDestroyArgs; +import org.apache.slider.common.params.ActionDiagnosticArgs; +import org.apache.slider.common.params.ActionEchoArgs; +import org.apache.slider.common.params.ActionExistsArgs; +import org.apache.slider.common.params.ActionFlexArgs; +import org.apache.slider.common.params.ActionFreezeArgs; +import org.apache.slider.common.params.ActionInstallKeytabArgs; +import org.apache.slider.common.params.ActionInstallPackageArgs; +import org.apache.slider.common.params.ActionKDiagArgs; +import org.apache.slider.common.params.ActionKeytabArgs; +import org.apache.slider.common.params.ActionKillContainerArgs; +import org.apache.slider.common.params.ActionListArgs; +import org.apache.slider.common.params.ActionLookupArgs; +import org.apache.slider.common.params.ActionNodesArgs; +import org.apache.slider.common.params.ActionPackageArgs; +import org.apache.slider.common.params.ActionRegistryArgs; +import org.apache.slider.common.params.ActionResolveArgs; +import org.apache.slider.common.params.ActionResourceArgs; +import org.apache.slider.common.params.ActionStatusArgs; +import org.apache.slider.common.params.ActionThawArgs; +import org.apache.slider.common.params.ActionTokensArgs; +import org.apache.slider.common.params.ActionUpgradeArgs; +import org.apache.slider.common.params.Arguments; +import org.apache.slider.common.params.ClientArgs; +import org.apache.slider.common.params.CommonArgs; +import org.apache.slider.common.params.LaunchArgsAccessor; +import org.apache.slider.common.tools.ConfigHelper; +import org.apache.slider.common.tools.Duration; +import org.apache.slider.common.tools.SliderFileSystem; +import org.apache.slider.common.tools.SliderUtils; +import org.apache.slider.common.tools.SliderVersionInfo; +import org.apache.slider.core.build.InstanceBuilder; +import org.apache.slider.core.build.InstanceIO; +import org.apache.slider.core.conf.AggregateConf; +import org.apache.slider.core.conf.ConfTree; +import org.apache.slider.core.conf.ConfTreeOperations; +import org.apache.slider.core.conf.MapOperations; +import org.apache.slider.core.conf.ResourcesInputPropertiesValidator; +import org.apache.slider.core.conf.TemplateInputPropertiesValidator; +import org.apache.slider.core.exceptions.BadClusterStateException; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.BadConfigException; +import org.apache.slider.core.exceptions.ErrorStrings; +import org.apache.slider.core.exceptions.NoSuchNodeException; +import org.apache.slider.core.exceptions.NotFoundException; +import org.apache.slider.core.exceptions.SliderException; +import org.apache.slider.core.exceptions.UnknownApplicationInstanceException; +import org.apache.slider.core.exceptions.UsageException; +import org.apache.slider.core.exceptions.WaitTimeoutException; +import org.apache.slider.core.launch.AppMasterLauncher; +import org.apache.slider.core.launch.ClasspathConstructor; +import org.apache.slider.core.launch.CredentialUtils; +import org.apache.slider.core.launch.JavaCommandLineBuilder; +import org.apache.slider.core.launch.LaunchedApplication; +import org.apache.slider.core.launch.RunningApplication; +import org.apache.slider.core.launch.SerializedApplicationReport; +import org.apache.slider.core.main.RunService; +import org.apache.slider.core.persist.AppDefinitionPersister; +import org.apache.slider.core.persist.ApplicationReportSerDeser; +import org.apache.slider.core.persist.ConfPersister; +import org.apache.slider.core.persist.JsonSerDeser; +import org.apache.slider.core.persist.LockAcquireFailedException; +import org.apache.slider.core.registry.SliderRegistryUtils; +import org.apache.slider.core.registry.YarnAppListClient; +import org.apache.slider.core.registry.docstore.ConfigFormat; +import org.apache.slider.core.registry.docstore.PublishedConfigSet; +import org.apache.slider.core.registry.docstore.PublishedConfiguration; +import org.apache.slider.core.registry.docstore.PublishedConfigurationOutputter; +import org.apache.slider.core.registry.docstore.PublishedExports; +import org.apache.slider.core.registry.docstore.PublishedExportsOutputter; +import org.apache.slider.core.registry.docstore.PublishedExportsSet; +import org.apache.slider.core.registry.retrieve.RegistryRetriever; +import org.apache.slider.core.zk.BlockingZKWatcher; +import org.apache.slider.core.zk.ZKIntegration; +import org.apache.slider.core.zk.ZKPathBuilder; +import org.apache.slider.providers.AbstractClientProvider; +import org.apache.slider.providers.SliderProviderFactory; +import org.apache.slider.providers.agent.AgentKeys; +import org.apache.slider.providers.slideram.SliderAMClientProvider; +import org.apache.slider.server.appmaster.SliderAppMaster; +import org.apache.slider.server.appmaster.rpc.RpcBinder; +import org.apache.slider.server.services.security.SecurityStore; +import org.apache.slider.server.services.utility.AbstractSliderLaunchedService; +import org.apache.zookeeper.CreateMode; +import org.apache.zookeeper.KeeperException; +import org.apache.zookeeper.ZooDefs; +import org.apache.zookeeper.data.ACL; +import org.codehaus.jettison.json.JSONException; +import org.codehaus.jettison.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.InterruptedIOException; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.io.Writer; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.URISyntaxException; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.apache.hadoop.registry.client.binding.RegistryUtils.*; +import static org.apache.slider.api.InternalKeys.*; +import static org.apache.slider.api.OptionKeys.*; +import static org.apache.slider.api.ResourceKeys.*; +import static org.apache.slider.common.Constants.HADOOP_JAAS_DEBUG; +import static org.apache.slider.common.params.SliderActions.*; +import static org.apache.slider.common.tools.SliderUtils.*; + + +/** + * Client service for Slider + */ + +public class SliderClient extends AbstractSliderLaunchedService implements RunService, + SliderExitCodes, SliderKeys, ErrorStrings, SliderClientAPI { + private static final Logger log = LoggerFactory.getLogger(SliderClient.class); + public static final String E_MUST_BE_A_VALID_JSON_FILE + = "Invalid configuration. Must be a valid json file."; + public static final String E_INVALID_INSTALL_LOCATION + = "A valid install location must be provided for the client."; + public static final String E_UNABLE_TO_READ_SUPPLIED_PACKAGE_FILE + = "Unable to read supplied package file"; + public static final String E_INVALID_APPLICATION_PACKAGE_LOCATION + = "A valid application package location required."; + public static final String E_INVALID_INSTALL_PATH = "Install path is not a valid directory"; + public static final String E_INSTALL_PATH_DOES_NOT_EXIST = "Install path does not exist"; + public static final String E_INVALID_APPLICATION_TYPE_NAME + = "A valid application type name is required (e.g. HBASE)."; + public static final String E_USE_REPLACEPKG_TO_OVERWRITE = "Use --replacepkg to overwrite."; + public static final String E_PACKAGE_DOES_NOT_EXIST = "Package does not exist"; + public static final String E_NO_ZOOKEEPER_QUORUM = "No Zookeeper quorum defined"; + public static final String E_NO_RESOURCE_MANAGER = "No valid Resource Manager address provided"; + public static final String E_PACKAGE_EXISTS = "Package exists"; + private static PrintStream clientOutputStream = System.out; + + // value should not be changed without updating string find in slider.py + private static final String PASSWORD_PROMPT = "Enter password for"; + + private ClientArgs serviceArgs; + public ApplicationId applicationId; + + private String deployedClusterName; + /** + * Cluster operations against the deployed cluster -will be null + * if no bonding has yet taken place + */ + private SliderClusterOperations sliderClusterOperations; + + protected SliderFileSystem sliderFileSystem; + + /** + * Yarn client service + */ + private SliderYarnClientImpl yarnClient; + private YarnAppListClient yarnAppListClient; + private AggregateConf launchedInstanceDefinition; + + /** + * The YARN registry service + */ + @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized") + private RegistryOperations registryOperations; + + /** + * Constructor + */ + public SliderClient() { + super("Slider Client"); + new HdfsConfiguration(); + new YarnConfiguration(); + } + + /** + * This is called Before serviceInit is called + * @param config the initial configuration build up by the + * service launcher. + * @param args argument list list of arguments passed to the command line + * after any launcher-specific commands have been stripped. + * @return the post-binding configuration to pass to the init() + * operation. + * @throws Exception + */ + @Override + public Configuration bindArgs(Configuration config, String... args) throws Exception { + config = super.bindArgs(config, args); + serviceArgs = new ClientArgs(args); + serviceArgs.parse(); + // add the slider XML config + ConfigHelper.injectSliderXMLResource(); + // yarn-ify + YarnConfiguration yarnConfiguration = new YarnConfiguration(config); + return patchConfiguration(yarnConfiguration); + } + + @Override + protected void serviceInit(Configuration conf) throws Exception { + Configuration clientConf = loadSliderClientXML(); + ConfigHelper.mergeConfigurations(conf, clientConf, SLIDER_CLIENT_XML, true); + serviceArgs.applyDefinitions(conf); + serviceArgs.applyFileSystemBinding(conf); + AbstractActionArgs coreAction = serviceArgs.getCoreAction(); + // init security with our conf + if (!coreAction.disableSecureLogin() && isHadoopClusterSecure(conf)) { + forceLogin(); + initProcessSecurity(conf); + } + if (coreAction.getHadoopServicesRequired()) { + initHadoopBinding(); + } + super.serviceInit(conf); + } + + /** + * Launched service execution. This runs {@link #exec()} + * then catches some exceptions and converts them to exit codes + * @return an exit code + * @throws Throwable + */ + @Override + public int runService() throws Throwable { + try { + return exec(); + } catch (FileNotFoundException | PathNotFoundException nfe) { + throw new NotFoundException(nfe, nfe.toString()); + } + } + + /** + * Execute the command line + * @return an exit code + * @throws Throwable on a failure + */ + public int exec() throws Throwable { + + // choose the action + String action = serviceArgs.getAction(); + if (isUnset(action)) { + throw new SliderException(EXIT_USAGE, serviceArgs.usage()); + } + + int exitCode = EXIT_SUCCESS; + String clusterName = serviceArgs.getClusterName(); + // actions + + switch (action) { + case ACTION_AM_SUICIDE: + exitCode = actionAmSuicide(clusterName, + serviceArgs.getActionAMSuicideArgs()); + break; + + case ACTION_BUILD: + exitCode = actionBuild(clusterName, serviceArgs.getActionBuildArgs()); + break; + + case ACTION_CLIENT: + exitCode = actionClient(serviceArgs.getActionClientArgs()); + break; + + case ACTION_CREATE: + exitCode = actionCreate(clusterName, serviceArgs.getActionCreateArgs()); + break; + + case ACTION_DEPENDENCY: + exitCode = actionDependency(serviceArgs.getActionDependencyArgs()); + break; + + case ACTION_DESTROY: + exitCode = actionDestroy(clusterName, serviceArgs.getActionDestroyArgs()); + break; + + case ACTION_DIAGNOSTICS: + exitCode = actionDiagnostic(serviceArgs.getActionDiagnosticArgs()); + break; + + case ACTION_EXISTS: + exitCode = actionExists(clusterName, + serviceArgs.getActionExistsArgs()); + break; + + case ACTION_FLEX: + exitCode = actionFlex(clusterName, serviceArgs.getActionFlexArgs()); + break; + + case ACTION_FREEZE: + exitCode = actionFreeze(clusterName, serviceArgs.getActionFreezeArgs()); + break; + + case ACTION_HELP: + log.info(serviceArgs.usage()); + break; + + case ACTION_KDIAG: + exitCode = actionKDiag(serviceArgs.getActionKDiagArgs()); + break; + + case ACTION_KILL_CONTAINER: + exitCode = actionKillContainer(clusterName, + serviceArgs.getActionKillContainerArgs()); + break; + + case ACTION_INSTALL_KEYTAB: + exitCode = actionInstallKeytab(serviceArgs.getActionInstallKeytabArgs()); + break; + + case ACTION_INSTALL_PACKAGE: + exitCode = actionInstallPkg(serviceArgs.getActionInstallPackageArgs()); + break; + + case ACTION_KEYTAB: + exitCode = actionKeytab(serviceArgs.getActionKeytabArgs()); + break; + + case ACTION_LIST: + exitCode = actionList(clusterName, serviceArgs.getActionListArgs()); + break; + + case ACTION_LOOKUP: + exitCode = actionLookup(serviceArgs.getActionLookupArgs()); + break; + + case ACTION_NODES: + exitCode = actionNodes("", serviceArgs.getActionNodesArgs()); + break; + + case ACTION_PACKAGE: + exitCode = actionPackage(serviceArgs.getActionPackageArgs()); + break; + + case ACTION_REGISTRY: + exitCode = actionRegistry(serviceArgs.getActionRegistryArgs()); + break; + + case ACTION_RESOLVE: + exitCode = actionResolve(serviceArgs.getActionResolveArgs()); + break; + + case ACTION_RESOURCE: + exitCode = actionResource(serviceArgs.getActionResourceArgs()); + break; + + case ACTION_STATUS: + exitCode = actionStatus(clusterName, serviceArgs.getActionStatusArgs()); + break; + + case ACTION_THAW: + exitCode = actionThaw(clusterName, serviceArgs.getActionThawArgs()); + break; + + case ACTION_TOKENS: + exitCode = actionTokens(serviceArgs.getActionTokenArgs()); + break; + + case ACTION_UPDATE: + exitCode = actionUpdate(clusterName, serviceArgs.getActionUpdateArgs()); + break; + + case ACTION_UPGRADE: + exitCode = actionUpgrade(clusterName, serviceArgs.getActionUpgradeArgs()); + break; + + case ACTION_VERSION: + exitCode = actionVersion(); + break; + + default: + throw new SliderException(EXIT_UNIMPLEMENTED, + "Unimplemented: " + action); + } + + return exitCode; + } + + /** + * Perform everything needed to init the hadoop binding. + * This assumes that the service is already in inited or started state + * @throws IOException + * @throws SliderException + */ + protected void initHadoopBinding() throws IOException, SliderException { + // validate the client + validateSliderClientEnvironment(null); + //create the YARN client + yarnClient = new SliderYarnClientImpl(); + yarnClient.init(getConfig()); + if (getServiceState() == STATE.STARTED) { + yarnClient.start(); + } + addService(yarnClient); + yarnAppListClient = + new YarnAppListClient(yarnClient, getUsername(), getConfig()); + // create the filesystem + sliderFileSystem = new SliderFileSystem(getConfig()); + } + + /** + * Delete the zookeeper node associated with the calling user and the cluster + * TODO: YARN registry operations + **/ + @VisibleForTesting + public boolean deleteZookeeperNode(String clusterName) throws YarnException, IOException { + String user = getUsername(); + String zkPath = ZKIntegration.mkClusterPath(user, clusterName); + Exception e = null; + try { + Configuration config = getConfig(); + ZKIntegration client = getZkClient(clusterName, user); + if (client != null) { + if (client.exists(zkPath)) { + log.info("Deleting zookeeper path {}", zkPath); + } + client.deleteRecursive(zkPath); + return true; + } + } catch (InterruptedException | BadConfigException | KeeperException ex) { + e = ex; + } + if (e != null) { + log.warn("Unable to recursively delete zk node {}", zkPath, e); + } + + return false; + } + + /** + * Create the zookeeper node associated with the calling user and the cluster + * + * @param clusterName slider application name + * @param nameOnly should the name only be created (i.e. don't create ZK node) + * @return the path, using the policy implemented in + * {@link ZKIntegration#mkClusterPath(String, String)} + * @throws YarnException + * @throws IOException + */ + @VisibleForTesting + public String createZookeeperNode(String clusterName, Boolean nameOnly) throws YarnException, IOException { + try { + return createZookeeperNodeInner(clusterName, nameOnly); + } catch (KeeperException.NodeExistsException e) { + return null; + } catch (KeeperException e) { + return null; + } catch (InterruptedException e) { + throw new InterruptedIOException(e.toString()); + } + } + + /** + * Create the zookeeper node associated with the calling user and the cluster + * -throwing exceptions on any failure + * @param clusterName cluster name + * @param nameOnly create the path, not the node + * @return the path, using the policy implemented in + * {@link ZKIntegration#mkClusterPath(String, String)} + * @throws YarnException + * @throws IOException + * @throws KeeperException + * @throws InterruptedException + */ + @VisibleForTesting + public String createZookeeperNodeInner(String clusterName, Boolean nameOnly) + throws YarnException, IOException, KeeperException, InterruptedException { + String user = getUsername(); + String zkPath = ZKIntegration.mkClusterPath(user, clusterName); + if (nameOnly) { + return zkPath; + } + ZKIntegration client = getZkClient(clusterName, user); + if (client != null) { + // set up the permissions. This must be done differently on a secure cluster from an insecure + // one + List zkperms = new ArrayList<>(); + if (UserGroupInformation.isSecurityEnabled()) { + zkperms.add(new ACL(ZooDefs.Perms.ALL, ZooDefs.Ids.AUTH_IDS)); + zkperms.add(new ACL(ZooDefs.Perms.READ, ZooDefs.Ids.ANYONE_ID_UNSAFE)); + } else { + zkperms.add(new ACL(ZooDefs.Perms.ALL, ZooDefs.Ids.ANYONE_ID_UNSAFE)); + } + client.createPath(zkPath, "", + zkperms, + CreateMode.PERSISTENT); + return zkPath; + } else { + return null; + } + } + + /** + * Gets a zookeeper client, returns null if it cannot connect to zookeeper + **/ + protected ZKIntegration getZkClient(String clusterName, String user) throws YarnException { + String registryQuorum = lookupZKQuorum(); + ZKIntegration client = null; + try { + BlockingZKWatcher watcher = new BlockingZKWatcher(); + client = ZKIntegration.newInstance(registryQuorum, user, clusterName, true, false, watcher, + ZKIntegration.SESSION_TIMEOUT); + client.init(); + watcher.waitForZKConnection(2 * 1000); + } catch (InterruptedException e) { + client = null; + log.warn("Unable to connect to zookeeper quorum {}", registryQuorum, e); + } catch (IOException e) { + log.warn("Unable to connect to zookeeper quorum {}", registryQuorum, e); + } + return client; + } + + /** + * Keep this signature for backward compatibility with + * force=true by default. + */ + @Override + public int actionDestroy(String clustername) throws YarnException, + IOException { + ActionDestroyArgs destroyArgs = new ActionDestroyArgs(); + destroyArgs.force = true; + return actionDestroy(clustername, destroyArgs); + } + + @Override + public int actionDestroy(String clustername, + ActionDestroyArgs destroyArgs) throws YarnException, IOException { + // verify that a live cluster isn't there + validateClusterName(clustername); + //no=op, it is now mandatory. + verifyBindingsDefined(); + verifyNoLiveClusters(clustername, "Destroy"); + boolean forceDestroy = destroyArgs.force; + log.debug("actionDestroy({}, force={})", clustername, forceDestroy); + + // create the directory path + Path clusterDirectory = sliderFileSystem.buildClusterDirPath(clustername); + // delete the directory; + FileSystem fs = sliderFileSystem.getFileSystem(); + boolean exists = fs.exists(clusterDirectory); + if (exists) { + log.debug("Application Instance {} found at {}: destroying", clustername, clusterDirectory); + if (!forceDestroy) { + // fail the command if --force is not explicitly specified + throw new UsageException("Destroy will permanently delete directories and registries. " + + "Reissue this command with the --force option if you want to proceed."); + } + if (!fs.delete(clusterDirectory, true)) { + log.warn("Filesystem returned false from delete() operation"); + } + + if(!deleteZookeeperNode(clustername)) { + log.warn("Unable to perform node cleanup in Zookeeper."); + } + + if (fs.exists(clusterDirectory)) { + log.warn("Failed to delete {}", clusterDirectory); + } + + } else { + log.debug("Application Instance {} already destroyed", clustername); + } + + // rm the registry entry —do not let this block the destroy operations + String registryPath = SliderRegistryUtils.registryPathForInstance( + clustername); + try { + getRegistryOperations().delete(registryPath, true); + } catch (IOException e) { + log.warn("Error deleting registry entry {}: {} ", registryPath, e, e); + } catch (SliderException e) { + log.warn("Error binding to registry {} ", e, e); + } + + List instances = findAllLiveInstances(clustername); + // detect any race leading to cluster creation during the check/destroy process + // and report a problem. + if (!instances.isEmpty()) { + throw new SliderException(EXIT_APPLICATION_IN_USE, + clustername + ": " + + E_DESTROY_CREATE_RACE_CONDITION + + " :" + + instances.get(0)); + } + log.info("Destroyed cluster {}", clustername); + return EXIT_SUCCESS; + } + + @Override + public int actionAmSuicide(String clustername, + ActionAMSuicideArgs args) throws YarnException, IOException { + SliderClusterOperations clusterOperations = + createClusterOperations(clustername); + clusterOperations.amSuicide(args.message, args.exitcode, args.waittime); + return EXIT_SUCCESS; + } + + @Override + public AbstractClientProvider createClientProvider(String provider) + throws SliderException { + SliderProviderFactory factory = + SliderProviderFactory.createSliderProviderFactory(provider); + return factory.createClientProvider(); + } + + /** + * Create the cluster -saving the arguments to a specification file first + * @param clustername cluster name + * @return the status code + * @throws YarnException Yarn problems + * @throws IOException other problems + * @throws BadCommandArgumentsException bad arguments. + */ + public int actionCreate(String clustername, ActionCreateArgs createArgs) throws + YarnException, + IOException { + + actionBuild(clustername, createArgs); + Path clusterDirectory = sliderFileSystem.buildClusterDirPath(clustername); + AggregateConf instanceDefinition = loadInstanceDefinitionUnresolved( + clustername, clusterDirectory); + try { + checkForCredentials(getConfig(), instanceDefinition.getAppConf()); + } catch (IOException e) { + sliderFileSystem.getFileSystem().delete(clusterDirectory, true); + throw e; + } + return startCluster(clustername, createArgs); + } + + @Override + public int actionUpgrade(String clustername, ActionUpgradeArgs upgradeArgs) + throws YarnException, IOException { + File template = upgradeArgs.template; + File resources = upgradeArgs.resources; + List containers = upgradeArgs.containers; + List components = upgradeArgs.components; + + // For upgrade spec, let's be little more strict with validation. If either + // --template or --resources is specified, then both needs to be specified. + // Otherwise the internal app config and resources states of the app will be + // unwantedly modified and the change will take effect to the running app + // immediately. + require(!(template != null && resources == null), + "Option %s must be specified with option %s", + Arguments.ARG_RESOURCES, Arguments.ARG_TEMPLATE); + + require(!(resources != null && template == null), + "Option %s must be specified with option %s", + Arguments.ARG_TEMPLATE, Arguments.ARG_RESOURCES); + + // For upgrade spec, both --template and --resources should be specified + // and neither of --containers or --components should be used + if (template != null && resources != null) { + require(CollectionUtils.isEmpty(containers), + "Option %s cannot be specified with %s or %s", + Arguments.ARG_CONTAINERS, Arguments.ARG_TEMPLATE, + Arguments.ARG_RESOURCES); + require(CollectionUtils.isEmpty(components), + "Option %s cannot be specified with %s or %s", + Arguments.ARG_COMPONENTS, Arguments.ARG_TEMPLATE, + Arguments.ARG_RESOURCES); + + // not an error to try to upgrade a stopped cluster, just return success + // code, appropriate log messages have already been dumped + if (!isAppInRunningState(clustername)) { + return EXIT_SUCCESS; + } + + // Now initiate the upgrade spec flow + buildInstanceDefinition(clustername, upgradeArgs, true, true, true); + SliderClusterOperations clusterOperations = createClusterOperations(clustername); + clusterOperations.amSuicide("AM restarted for application upgrade", 1, 1000); + return EXIT_SUCCESS; + } + + // Since neither --template or --resources were specified, it is upgrade + // containers flow. Here any one or both of --containers and --components + // can be specified. If a container is specified with --containers option + // and also belongs to a component type specified with --components, it will + // be upgraded only once. + return actionUpgradeContainers(clustername, upgradeArgs); + } + + private int actionUpgradeContainers(String clustername, + ActionUpgradeArgs upgradeArgs) throws YarnException, IOException { + verifyBindingsDefined(); + validateClusterName(clustername); + int waittime = upgradeArgs.getWaittime(); // ignored for now + String text = "Upgrade containers"; + log.debug("actionUpgradeContainers({}, reason={}, wait={})", clustername, + text, waittime); + + // not an error to try to upgrade a stopped cluster, just return success + // code, appropriate log messages have already been dumped + if (!isAppInRunningState(clustername)) { + return EXIT_SUCCESS; + } + + // Create sets of containers and components to get rid of duplicates and + // for quick lookup during checks below + Set containers = new HashSet<>(); + if (upgradeArgs.containers != null) { + containers.addAll(new ArrayList<>(upgradeArgs.containers)); + } + Set components = new HashSet<>(); + if (upgradeArgs.components != null) { + components.addAll(new ArrayList<>(upgradeArgs.components)); + } + + // check validity of component names and running containers here + List liveContainers = getContainers(clustername); + Set validContainers = new HashSet<>(); + Set validComponents = new HashSet<>(); + for (ContainerInformation liveContainer : liveContainers) { + boolean allContainersAndComponentsAccountedFor = true; + if (CollectionUtils.isNotEmpty(containers)) { + if (containers.contains(liveContainer.containerId)) { + containers.remove(liveContainer.containerId); + validContainers.add(liveContainer.containerId); + } + allContainersAndComponentsAccountedFor = false; + } + if (CollectionUtils.isNotEmpty(components)) { + if (components.contains(liveContainer.component)) { + components.remove(liveContainer.component); + validComponents.add(liveContainer.component); + } + allContainersAndComponentsAccountedFor = false; + } + if (allContainersAndComponentsAccountedFor) { + break; + } + } + + // If any item remains in containers or components then they are invalid. + // Log warning for them and proceed. + if (CollectionUtils.isNotEmpty(containers)) { + log.warn("Invalid set of containers provided {}", containers); + } + if (CollectionUtils.isNotEmpty(components)) { + log.warn("Invalid set of components provided {}", components); + } + + // If not a single valid container or component is specified do not proceed + if (CollectionUtils.isEmpty(validContainers) + && CollectionUtils.isEmpty(validComponents)) { + log.error("Not a single valid container or component specified. Nothing to do."); + return EXIT_NOT_FOUND; + } + + SliderClusterProtocol appMaster = connect(findInstance(clustername)); + Messages.UpgradeContainersRequestProto r = + Messages.UpgradeContainersRequestProto + .newBuilder() + .setMessage(text) + .addAllContainer(validContainers) + .addAllComponent(validComponents) + .build(); + appMaster.upgradeContainers(r); + log.info("Cluster upgrade issued for -"); + if (CollectionUtils.isNotEmpty(validContainers)) { + log.info(" Containers (total {}): {}", validContainers.size(), + validContainers); + } + if (CollectionUtils.isNotEmpty(validComponents)) { + log.info(" Components (total {}): {}", validComponents.size(), + validComponents); + } + + return EXIT_SUCCESS; + } + + // returns true if and only if app is in RUNNING state + private boolean isAppInRunningState(String clustername) throws YarnException, + IOException { + // is this actually a known cluster? + sliderFileSystem.locateInstanceDefinition(clustername); + ApplicationReport app = findInstance(clustername); + if (app == null) { + // exit early + log.info("Cluster {} not running", clustername); + return false; + } + log.debug("App to upgrade was found: {}:\n{}", clustername, + new OnDemandReportStringifier(app)); + if (app.getYarnApplicationState().ordinal() >= YarnApplicationState.FINISHED.ordinal()) { + log.info("Cluster {} is in a terminated state {}. Use command '{}' instead.", + clustername, app.getYarnApplicationState(), ACTION_UPDATE); + return false; + } + + // IPC request to upgrade containers is possible if the app is running. + if (app.getYarnApplicationState().ordinal() < YarnApplicationState.RUNNING + .ordinal()) { + log.info("Cluster {} is in a pre-running state {}. To upgrade it needs " + + "to be RUNNING.", clustername, app.getYarnApplicationState()); + return false; + } + + return true; + } + + protected static void checkForCredentials(Configuration conf, + ConfTree tree) throws IOException { + if (tree.credentials == null || tree.credentials.isEmpty()) { + log.info("No credentials requested"); + return; + } + + BufferedReader br = null; + try { + for (Entry> cred : tree.credentials.entrySet()) { + String provider = cred.getKey(); + List aliases = cred.getValue(); + if (aliases == null || aliases.isEmpty()) { + continue; + } + Configuration c = new Configuration(conf); + c.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, provider); + CredentialProvider credentialProvider = CredentialProviderFactory.getProviders(c).get(0); + Set existingAliases = new HashSet<>(credentialProvider.getAliases()); + for (String alias : aliases) { + if (existingAliases.contains(alias.toLowerCase(Locale.ENGLISH))) { + log.info("Credentials for " + alias + " found in " + provider); + } else { + if (br == null) { + br = new BufferedReader(new InputStreamReader(System.in)); + } + char[] pass = readPassword(alias, br); + credentialProvider.createCredentialEntry(alias, pass); + credentialProvider.flush(); + Arrays.fill(pass, ' '); + } + } + } + } finally { + org.apache.hadoop.io.IOUtils.closeStream(br); + } + } + + private static char[] readOnePassword(String alias) throws IOException { + try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { + return readPassword(alias, br); + } + } + + // using a normal reader instead of a secure one, + // because stdin is not hooked up to the command line + private static char[] readPassword(String alias, BufferedReader br) + throws IOException { + char[] cred = null; + + boolean noMatch; + do { + log.info(String.format("%s %s: ", PASSWORD_PROMPT, alias)); + char[] newPassword1 = br.readLine().toCharArray(); + log.info(String.format("%s %s again: ", PASSWORD_PROMPT, alias)); + char[] newPassword2 = br.readLine().toCharArray(); + noMatch = !Arrays.equals(newPassword1, newPassword2); + if (noMatch) { + if (newPassword1 != null) Arrays.fill(newPassword1, ' '); + log.info(String.format("Passwords don't match. Try again.")); + } else { + cred = newPassword1; + } + if (newPassword2 != null) Arrays.fill(newPassword2, ' '); + } while (noMatch); + if (cred == null) + throw new IOException("Could not read credentials for " + alias + + " from stdin"); + return cred; + } + + @Override + public int actionBuild(String clustername, + AbstractClusterBuildingActionArgs buildInfo) throws + YarnException, + IOException { + + buildInstanceDefinition(clustername, buildInfo, false, false); + return EXIT_SUCCESS; + } + + @Override + public int actionKeytab(ActionKeytabArgs keytabInfo) + throws YarnException, IOException { + if (keytabInfo.install) { + return actionInstallKeytab(keytabInfo); + } else if (keytabInfo.delete) { + return actionDeleteKeytab(keytabInfo); + } else if (keytabInfo.list) { + return actionListKeytab(keytabInfo); + } else { + throw new BadCommandArgumentsException( + "Keytab option specified not found.\n" + + CommonArgs.usage(serviceArgs, ACTION_KEYTAB)); + } + } + + private int actionListKeytab(ActionKeytabArgs keytabInfo) throws IOException { + String folder = keytabInfo.folder != null ? keytabInfo.folder : StringUtils.EMPTY; + Path keytabPath = sliderFileSystem.buildKeytabInstallationDirPath(folder); + RemoteIterator files = + sliderFileSystem.getFileSystem().listFiles(keytabPath, true); + log.info("Keytabs:"); + while (files.hasNext()) { + log.info("\t" + files.next().getPath().toString()); + } + + return EXIT_SUCCESS; + } + + private int actionDeleteKeytab(ActionKeytabArgs keytabInfo) + throws BadCommandArgumentsException, IOException { + if (StringUtils.isEmpty(keytabInfo.folder)) { + throw new BadCommandArgumentsException( + "A valid destination keytab sub-folder name is required (e.g. 'security').\n" + + CommonArgs.usage(serviceArgs, ACTION_KEYTAB)); + } + + if (StringUtils.isEmpty(keytabInfo.keytab)) { + throw new BadCommandArgumentsException("A keytab name is required."); + } + + Path pkgPath = sliderFileSystem.buildKeytabInstallationDirPath(keytabInfo.folder); + + Path fileInFs = new Path(pkgPath, keytabInfo.keytab ); + log.info("Deleting keytab {}", fileInFs); + FileSystem sfs = sliderFileSystem.getFileSystem(); + require(sfs.exists(fileInFs), "No keytab to delete found at %s", + fileInFs.toUri()); + sfs.delete(fileInFs, false); + + return EXIT_SUCCESS; + } + + private int actionInstallKeytab(ActionKeytabArgs keytabInfo) + throws BadCommandArgumentsException, IOException { + Path srcFile = null; + require(isSet(keytabInfo.folder), + "A valid destination keytab sub-folder name is required (e.g. 'security').\n" + + CommonArgs.usage(serviceArgs, ACTION_KEYTAB)); + + requireArgumentSet(Arguments.ARG_KEYTAB, keytabInfo.keytab); + File keytabFile = new File(keytabInfo.keytab); + require(keytabFile.isFile(), + "Unable to access supplied keytab file at %s", keytabFile.getAbsolutePath()); + srcFile = new Path(keytabFile.toURI()); + + Path pkgPath = sliderFileSystem.buildKeytabInstallationDirPath(keytabInfo.folder); + FileSystem sfs = sliderFileSystem.getFileSystem(); + sfs.mkdirs(pkgPath); + sfs.setPermission(pkgPath, new FsPermission( + FsAction.ALL, FsAction.NONE, FsAction.NONE)); + + Path fileInFs = new Path(pkgPath, srcFile.getName()); + log.info("Installing keytab {} at {} and overwrite is {}.", + srcFile, fileInFs, keytabInfo.overwrite); + require(!(sfs.exists(fileInFs) && !keytabInfo.overwrite), + "Keytab exists at %s. Use --overwrite to overwrite.", fileInFs.toUri()); + + sfs.copyFromLocalFile(false, keytabInfo.overwrite, srcFile, fileInFs); + sfs.setPermission(fileInFs, + new FsPermission(FsAction.READ_WRITE, FsAction.NONE, FsAction.NONE)); + + return EXIT_SUCCESS; + } + + @Override + public int actionInstallKeytab(ActionInstallKeytabArgs installKeytabInfo) + throws YarnException, IOException { + log.warn("The 'install-keytab' option has been deprecated. Please use 'keytab --install'."); + return actionKeytab(new ActionKeytabArgs(installKeytabInfo)); + } + + @Override + public int actionInstallPkg(ActionInstallPackageArgs installPkgInfo) throws + YarnException, + IOException { + log.warn("The " + ACTION_INSTALL_PACKAGE + + " option has been deprecated. Please use '" + + ACTION_PACKAGE + " " + ClientArgs.ARG_INSTALL + "'."); + if (StringUtils.isEmpty(installPkgInfo.name)) { + throw new BadCommandArgumentsException( + E_INVALID_APPLICATION_TYPE_NAME + "\n" + + CommonArgs.usage(serviceArgs, ACTION_INSTALL_PACKAGE)); + } + Path srcFile = extractPackagePath(installPkgInfo.packageURI); + + // Do not provide new options to install-package command as it is in + // deprecated mode. So version is kept null here. Use package --install. + Path pkgPath = sliderFileSystem.buildPackageDirPath(installPkgInfo.name, + null); + FileSystem sfs = sliderFileSystem.getFileSystem(); + sfs.mkdirs(pkgPath); + + Path fileInFs = new Path(pkgPath, srcFile.getName()); + log.info("Installing package {} at {} and overwrite is {}.", + srcFile, fileInFs, installPkgInfo.replacePkg); + require(!(sfs.exists(fileInFs) && !installPkgInfo.replacePkg), + "Package exists at %s. : %s", fileInFs.toUri(), E_USE_REPLACEPKG_TO_OVERWRITE); + sfs.copyFromLocalFile(false, installPkgInfo.replacePkg, srcFile, fileInFs); + return EXIT_SUCCESS; + } + + @Override + public int actionResource(ActionResourceArgs resourceInfo) + throws YarnException, IOException { + if (resourceInfo.help) { + actionHelp(ACTION_RESOURCE); + return EXIT_SUCCESS; + } else if (resourceInfo.install) { + return actionInstallResource(resourceInfo); + } else if (resourceInfo.delete) { + return actionDeleteResource(resourceInfo); + } else if (resourceInfo.list) { + return actionListResource(resourceInfo); + } else { + throw new BadCommandArgumentsException( + "Resource option specified not found.\n" + + CommonArgs.usage(serviceArgs, ACTION_RESOURCE)); + } + } + + private int actionListResource(ActionResourceArgs resourceInfo) throws IOException { + String folder = resourceInfo.folder != null ? resourceInfo.folder : StringUtils.EMPTY; + Path path = sliderFileSystem.buildResourcePath(folder); + RemoteIterator files = + sliderFileSystem.getFileSystem().listFiles(path, true); + log.info("Resources:"); + while (files.hasNext()) { + log.info("\t" + files.next().getPath().toString()); + } + + return EXIT_SUCCESS; + } + + private int actionDeleteResource(ActionResourceArgs resourceInfo) + throws BadCommandArgumentsException, IOException { + if (StringUtils.isEmpty(resourceInfo.resource)) { + throw new BadCommandArgumentsException("A file name is required."); + } + + Path fileInFs; + if (resourceInfo.folder == null) { + fileInFs = sliderFileSystem.buildResourcePath(resourceInfo.resource); + } else { + fileInFs = sliderFileSystem.buildResourcePath(resourceInfo.folder, + resourceInfo.resource); + } + + log.info("Deleting resource {}", fileInFs); + FileSystem sfs = sliderFileSystem.getFileSystem(); + require(sfs.exists(fileInFs), "No resource to delete found at %s", fileInFs.toUri()); + sfs.delete(fileInFs, true); + + return EXIT_SUCCESS; + } + + private int actionInstallResource(ActionResourceArgs resourceInfo) + throws BadCommandArgumentsException, IOException { + Path srcFile = null; + String folder = resourceInfo.folder != null ? resourceInfo.folder : StringUtils.EMPTY; + + requireArgumentSet(Arguments.ARG_RESOURCE, resourceInfo.resource); + File file = new File(resourceInfo.resource); + require(file.isFile() || file.isDirectory(), + "Unable to access supplied file at %s", file.getAbsolutePath()); + + File[] files; + if (file.isDirectory()) { + files = file.listFiles(); + } else { + files = new File[] { file }; + } + + Path pkgPath = sliderFileSystem.buildResourcePath(folder); + FileSystem sfs = sliderFileSystem.getFileSystem(); + + if (!sfs.exists(pkgPath)) { + sfs.mkdirs(pkgPath); + sfs.setPermission(pkgPath, new FsPermission( + FsAction.ALL, FsAction.NONE, FsAction.NONE)); + } else { + require(sfs.isDirectory(pkgPath), "Specified folder %s exists and is " + + "not a directory", folder); + } + + for (File f : files) { + srcFile = new Path(f.toURI()); + + Path fileInFs = new Path(pkgPath, srcFile.getName()); + log.info("Installing file {} at {} and overwrite is {}.", + srcFile, fileInFs, resourceInfo.overwrite); + require(!(sfs.exists(fileInFs) && !resourceInfo.overwrite), + "File exists at %s. Use --overwrite to overwrite.", fileInFs.toUri()); + + sfs.copyFromLocalFile(false, resourceInfo.overwrite, srcFile, fileInFs); + sfs.setPermission(fileInFs, + new FsPermission(FsAction.READ_WRITE, FsAction.NONE, FsAction.NONE)); + } + + return EXIT_SUCCESS; + } + + @Override + public int actionClient(ActionClientArgs clientInfo) throws + YarnException, + IOException { + if (clientInfo.install) { + return doClientInstall(clientInfo); + } else if (clientInfo.getCertStore) { + return doCertificateStoreRetrieval(clientInfo); + } else { + throw new BadCommandArgumentsException( + "Only install, keystore, and truststore commands are supported for the client.\n" + + CommonArgs.usage(serviceArgs, ACTION_CLIENT)); + + } + } + + private int doCertificateStoreRetrieval(ActionClientArgs clientInfo) + throws YarnException, IOException { + if (clientInfo.keystore != null && clientInfo.truststore != null) { + throw new BadCommandArgumentsException( + "Only one of either keystore or truststore can be retrieved at one time. " + + "Retrieval of both should be done separately\n" + + CommonArgs.usage(serviceArgs, ACTION_CLIENT)); + } + + requireArgumentSet(Arguments.ARG_NAME, clientInfo.name); + + File storeFile = null; + SecurityStore.StoreType type; + if (clientInfo.keystore != null) { + storeFile = clientInfo.keystore; + type = SecurityStore.StoreType.keystore; + } else { + storeFile = clientInfo.truststore; + type = SecurityStore.StoreType.truststore; + } + + require (!storeFile.exists(), + "File %s already exists. Please remove that file or select a different file name.", + storeFile.getAbsolutePath()); + String hostname = null; + if (type == SecurityStore.StoreType.keystore) { + hostname = clientInfo.hostname; + if (hostname == null) { + hostname = InetAddress.getLocalHost().getCanonicalHostName(); + log.info("No hostname specified via command line. Using {}", hostname); + } + } + + String password = clientInfo.password; + if (password == null) { + String provider = clientInfo.provider; + String alias = clientInfo.alias; + if (provider != null && alias != null) { + Configuration conf = new Configuration(getConfig()); + conf.set(CredentialProviderFactory.CREDENTIAL_PROVIDER_PATH, provider); + char[] chars = conf.getPassword(alias); + if (chars == null) { + CredentialProvider credentialProvider = + CredentialProviderFactory.getProviders(conf).get(0); + chars = readOnePassword(alias); + credentialProvider.createCredentialEntry(alias, chars); + credentialProvider.flush(); + } + password = String.valueOf(chars); + Arrays.fill(chars, ' '); + } else { + log.info("No password and no provider/alias pair were provided, " + + "prompting for password"); + // get a password + password = String.valueOf(readOnePassword(type.name())); + } + } + + byte[] keystore = createClusterOperations(clientInfo.name) + .getClientCertificateStore(hostname, "client", password, type.name()); + // persist to file + FileOutputStream storeFileOutputStream = null; + try { + storeFileOutputStream = new FileOutputStream(storeFile); + IOUtils.write(keystore, storeFileOutputStream); + } catch (Exception e) { + log.error("Unable to persist to file {}", storeFile); + throw e; + } finally { + if (storeFileOutputStream != null) { + storeFileOutputStream.close(); + } + } + + return EXIT_SUCCESS; + } + + private int doClientInstall(ActionClientArgs clientInfo) + throws IOException, SliderException { + + require(clientInfo.installLocation != null, + E_INVALID_INSTALL_LOCATION +"\n" + + CommonArgs.usage(serviceArgs, ACTION_CLIENT)); + require(clientInfo.installLocation.exists(), + E_INSTALL_PATH_DOES_NOT_EXIST + ": " + clientInfo.installLocation.getAbsolutePath()); + + require(clientInfo.installLocation.isDirectory(), + E_INVALID_INSTALL_PATH + ": " + clientInfo.installLocation.getAbsolutePath()); + + File pkgFile; + File tmpDir = null; + + require(isSet(clientInfo.packageURI) || isSet(clientInfo.name), + E_INVALID_APPLICATION_PACKAGE_LOCATION); + if (isSet(clientInfo.packageURI)) { + pkgFile = new File(clientInfo.packageURI); + } else { + Path appDirPath = sliderFileSystem.buildAppDefDirPath(clientInfo.name); + Path appDefPath = new Path(appDirPath, SliderKeys.DEFAULT_APP_PKG); + require(sliderFileSystem.isFile(appDefPath), + E_INVALID_APPLICATION_PACKAGE_LOCATION); + tmpDir = Files.createTempDir(); + pkgFile = new File(tmpDir, SliderKeys.DEFAULT_APP_PKG); + sliderFileSystem.copyHdfsFileToLocal(appDefPath, pkgFile); + } + require(pkgFile.isFile(), + E_UNABLE_TO_READ_SUPPLIED_PACKAGE_FILE + " at %s", pkgFile.getAbsolutePath()); + + JSONObject config = null; + if(clientInfo.clientConfig != null) { + try { + byte[] encoded = Files.toByteArray(clientInfo.clientConfig); + config = new JSONObject(new String(encoded, Charset.defaultCharset())); + } catch (JSONException jsonEx) { + log.error("Unable to read supplied configuration at {}: {}", + clientInfo.clientConfig, jsonEx); + log.debug("Unable to read supplied configuration at {}: {}", + clientInfo.clientConfig, jsonEx, jsonEx); + throw new BadConfigException(E_MUST_BE_A_VALID_JSON_FILE, jsonEx); + } + } + + // Only INSTALL is supported + AbstractClientProvider + provider = createClientProvider(SliderProviderFactory.DEFAULT_CLUSTER_TYPE); + provider.processClientOperation(sliderFileSystem, + getRegistryOperations(), + getConfig(), + "INSTALL", + clientInfo.installLocation, + pkgFile, + config, + clientInfo.name); + return EXIT_SUCCESS; + } + + + @Override + public int actionPackage(ActionPackageArgs actionPackageInfo) + throws YarnException, IOException { + initializeOutputStream(actionPackageInfo.out); + int exitCode = -1; + if (actionPackageInfo.help) { + exitCode = actionHelp(ACTION_PACKAGE); + } + if (actionPackageInfo.install) { + exitCode = actionPackageInstall(actionPackageInfo); + } + if (actionPackageInfo.delete) { + exitCode = actionPackageDelete(actionPackageInfo); + } + if (actionPackageInfo.list) { + exitCode = actionPackageList(); + } + if (actionPackageInfo.instances) { + exitCode = actionPackageInstances(); + } + finalizeOutputStream(actionPackageInfo.out); + if (exitCode != -1) { + return exitCode; + } + throw new BadCommandArgumentsException( + "Select valid package operation option"); + } + + private void initializeOutputStream(String outFile) + throws FileNotFoundException { + if (outFile != null) { + clientOutputStream = new PrintStream(new FileOutputStream(outFile)); + } else { + clientOutputStream = System.out; + } + } + + private void finalizeOutputStream(String outFile) { + if (outFile != null && clientOutputStream != null) { + clientOutputStream.flush(); + clientOutputStream.close(); + } + clientOutputStream = System.out; + } + + private int actionPackageInstances() throws YarnException, IOException { + Map persistentInstances = sliderFileSystem + .listPersistentInstances(); + if (persistentInstances.isEmpty()) { + log.info("No slider cluster specification available"); + return EXIT_SUCCESS; + } + String pkgPathValue = sliderFileSystem + .buildPackageDirPath(StringUtils.EMPTY, StringUtils.EMPTY).toUri() + .getPath(); + FileSystem fs = sliderFileSystem.getFileSystem(); + Iterator> instanceItr = persistentInstances + .entrySet().iterator(); + log.info("List of applications with its package name and path"); + println("%-25s %15s %30s %s", "Cluster Name", "Package Name", + "Package Version", "Application Location"); + while(instanceItr.hasNext()) { + Map.Entry entry = instanceItr.next(); + String clusterName = entry.getKey(); + Path clusterPath = entry.getValue(); + AggregateConf instanceDefinition = loadInstanceDefinitionUnresolved( + clusterName, clusterPath); + Path appDefPath = null; + try { + appDefPath = new Path( + getApplicationDefinitionPath(instanceDefinition + .getAppConfOperations())); + } catch (BadConfigException e) { + // Invalid cluster state, so move on to next. No need to log anything + // as this is just listing of instances. + continue; + } + if (!appDefPath.isUriPathAbsolute()) { + appDefPath = new Path(fs.getHomeDirectory(), appDefPath); + } + String appDefPathStr = appDefPath.toUri().toString(); + try { + if (appDefPathStr.contains(pkgPathValue) && fs.isFile(appDefPath)) { + String packageName = appDefPath.getParent().getName(); + String packageVersion = StringUtils.EMPTY; + if (instanceDefinition.isVersioned()) { + packageVersion = packageName; + packageName = appDefPath.getParent().getParent().getName(); + } + println("%-25s %15s %30s %s", clusterName, packageName, + packageVersion, appDefPathStr); + } + } catch (IOException e) { + log.debug("{} application definition path {} is not found.", clusterName, appDefPathStr); + } + } + return EXIT_SUCCESS; + } + + private int actionPackageList() throws IOException { + Path pkgPath = sliderFileSystem.buildPackageDirPath(StringUtils.EMPTY, + StringUtils.EMPTY); + log.info("Package install path : {}", pkgPath); + FileSystem sfs = sliderFileSystem.getFileSystem(); + if (!sfs.isDirectory(pkgPath)) { + log.info("No package(s) installed"); + return EXIT_SUCCESS; + } + FileStatus[] fileStatus = sfs.listStatus(pkgPath); + boolean hasPackage = false; + StringBuilder sb = new StringBuilder(); + sb.append("List of installed packages:\n"); + for (FileStatus fstat : fileStatus) { + if (fstat.isDirectory()) { + sb.append("\t").append(fstat.getPath().getName()); + sb.append("\n"); + hasPackage = true; + } + } + if (hasPackage) { + println(sb.toString()); + } else { + log.info("No package(s) installed"); + } + return EXIT_SUCCESS; + } + + private void createSummaryMetainfoFile(Path srcFile, Path destFile, + boolean overwrite) throws IOException { + FileSystem srcFs = srcFile.getFileSystem(getConfig()); + try (InputStream inputStreamJson = SliderUtils + .getApplicationResourceInputStream(srcFs, srcFile, "metainfo.json"); + InputStream inputStreamXml = SliderUtils + .getApplicationResourceInputStream(srcFs, srcFile, "metainfo.xml");) { + InputStream inputStream = null; + Path summaryFileInFs = null; + if (inputStreamJson != null) { + inputStream = inputStreamJson; + summaryFileInFs = new Path(destFile.getParent(), destFile.getName() + + ".metainfo.json"); + log.info("Found JSON metainfo file in package"); + } else if (inputStreamXml != null) { + inputStream = inputStreamXml; + summaryFileInFs = new Path(destFile.getParent(), destFile.getName() + + ".metainfo.xml"); + log.info("Found XML metainfo file in package"); + } + if (inputStream != null) { + try (FSDataOutputStream dataOutputStream = sliderFileSystem + .getFileSystem().create(summaryFileInFs, overwrite)) { + log.info("Creating summary metainfo file"); + IOUtils.copy(inputStream, dataOutputStream); + } + } + } + } + + private int actionPackageInstall(ActionPackageArgs actionPackageArgs) + throws YarnException, IOException { + requireArgumentSet(Arguments.ARG_NAME, actionPackageArgs.name); + + Path srcFile = extractPackagePath(actionPackageArgs.packageURI); + + Path pkgPath = sliderFileSystem.buildPackageDirPath(actionPackageArgs.name, + actionPackageArgs.version); + FileSystem fs = sliderFileSystem.getFileSystem(); + if (!fs.exists(pkgPath)) { + fs.mkdirs(pkgPath); + } + + Path fileInFs = new Path(pkgPath, srcFile.getName()); + require(actionPackageArgs.replacePkg || !fs.exists(fileInFs), + E_PACKAGE_EXISTS +" at %s. Use --replacepkg to overwrite.", fileInFs.toUri()); + + log.info("Installing package {} to {} (overwrite set to {})", srcFile, + fileInFs, actionPackageArgs.replacePkg); + fs.copyFromLocalFile(false, actionPackageArgs.replacePkg, srcFile, fileInFs); + createSummaryMetainfoFile(srcFile, fileInFs, actionPackageArgs.replacePkg); + + String destPathWithHomeDir = Path + .getPathWithoutSchemeAndAuthority(fileInFs).toString(); + String destHomeDir = Path.getPathWithoutSchemeAndAuthority( + fs.getHomeDirectory()).toString(); + // a somewhat contrived approach to stripping out the home directory and any trailing + // separator; designed to work on windows and unix + String destPathWithoutHomeDir; + if (destPathWithHomeDir.startsWith(destHomeDir)) { + destPathWithoutHomeDir = destPathWithHomeDir.substring(destHomeDir.length()); + if (destPathWithoutHomeDir.startsWith("/") || destPathWithoutHomeDir.startsWith("\\")) { + destPathWithoutHomeDir = destPathWithoutHomeDir.substring(1); + } + } else { + destPathWithoutHomeDir = destPathWithHomeDir; + } + log.info("Set " + AgentKeys.APP_DEF + " in your app config JSON to {}", + destPathWithoutHomeDir); + + return EXIT_SUCCESS; + } + + private Path extractPackagePath(String packageURI) + throws BadCommandArgumentsException { + require(isSet(packageURI), E_INVALID_APPLICATION_PACKAGE_LOCATION); + File pkgFile = new File(packageURI); + require(pkgFile.isFile(), + E_UNABLE_TO_READ_SUPPLIED_PACKAGE_FILE + ": " + pkgFile.getAbsolutePath()); + return new Path(pkgFile.toURI()); + } + + private int actionPackageDelete(ActionPackageArgs actionPackageArgs) throws + YarnException, IOException { + requireArgumentSet(Arguments.ARG_NAME, actionPackageArgs.name); + + Path pkgPath = sliderFileSystem.buildPackageDirPath(actionPackageArgs.name, + actionPackageArgs.version); + FileSystem fs = sliderFileSystem.getFileSystem(); + require(fs.exists(pkgPath), E_PACKAGE_DOES_NOT_EXIST +": %s ", pkgPath.toUri()); + log.info("Deleting package {} at {}.", actionPackageArgs.name, pkgPath); + + if(fs.delete(pkgPath, true)) { + log.info("Deleted package {} " + actionPackageArgs.name); + return EXIT_SUCCESS; + } else { + log.warn("Package deletion failed."); + return EXIT_NOT_FOUND; + } + } + + @Override + public int actionUpdate(String clustername, + AbstractClusterBuildingActionArgs buildInfo) throws + YarnException, IOException { + buildInstanceDefinition(clustername, buildInfo, true, true); + return EXIT_SUCCESS; + } + + /** + * Build up the AggregateConfiguration for an application instance then + * persists it + * @param clustername name of the cluster + * @param buildInfo the arguments needed to build the cluster + * @param overwrite true if existing cluster directory can be overwritten + * @param liveClusterAllowed true if live cluster can be modified + * @throws YarnException + * @throws IOException + */ + + public void buildInstanceDefinition(String clustername, + AbstractClusterBuildingActionArgs buildInfo, boolean overwrite, + boolean liveClusterAllowed) throws YarnException, IOException { + buildInstanceDefinition(clustername, buildInfo, overwrite, + liveClusterAllowed, false); + } + + public void buildInstanceDefinition(String clustername, + AbstractClusterBuildingActionArgs buildInfo, boolean overwrite, + boolean liveClusterAllowed, boolean isUpgradeFlow) throws YarnException, + IOException { + // verify that a live cluster isn't there + validateClusterName(clustername); + verifyBindingsDefined(); + if (!liveClusterAllowed) { + verifyNoLiveClusters(clustername, "Create"); + } + + Configuration conf = getConfig(); + String registryQuorum = lookupZKQuorum(); + + Path appconfdir = buildInfo.getConfdir(); + // Provider + String providerName = buildInfo.getProvider(); + requireArgumentSet(Arguments.ARG_PROVIDER, providerName); + log.debug("Provider is {}", providerName); + SliderAMClientProvider sliderAM = new SliderAMClientProvider(conf); + AbstractClientProvider provider = + createClientProvider(providerName); + InstanceBuilder builder = + new InstanceBuilder(sliderFileSystem, + getConfig(), + clustername); + + AggregateConf instanceDefinition = new AggregateConf(); + ConfTreeOperations appConf = instanceDefinition.getAppConfOperations(); + ConfTreeOperations resources = instanceDefinition.getResourceOperations(); + ConfTreeOperations internal = instanceDefinition.getInternalOperations(); + //initial definition is set by the providers + sliderAM.prepareInstanceConfiguration(instanceDefinition); + provider.prepareInstanceConfiguration(instanceDefinition); + + //load in any specified on the command line + if (buildInfo.resources != null) { + try { + resources.mergeFile(buildInfo.resources, + new ResourcesInputPropertiesValidator()); + + } catch (IOException e) { + throw new BadConfigException(e, + "incorrect argument to %s: \"%s\" : %s ", + Arguments.ARG_RESOURCES, + buildInfo.resources, + e.toString()); + } + } + if (buildInfo.template != null) { + try { + appConf.mergeFile(buildInfo.template, + new TemplateInputPropertiesValidator()); + } catch (IOException e) { + throw new BadConfigException(e, + "incorrect argument to %s: \"%s\" : %s ", + Arguments.ARG_TEMPLATE, + buildInfo.template, + e.toString()); + } + } + + if (isUpgradeFlow) { + ActionUpgradeArgs upgradeInfo = (ActionUpgradeArgs) buildInfo; + if (!upgradeInfo.force) { + validateClientAndClusterResource(clustername, resources); + } + } + + //get the command line options + ConfTree cmdLineAppOptions = buildInfo.buildAppOptionsConfTree(); + ConfTree cmdLineResourceOptions = buildInfo.buildResourceOptionsConfTree(); + + appConf.merge(cmdLineAppOptions); + + AppDefinitionPersister appDefinitionPersister = new AppDefinitionPersister(sliderFileSystem); + appDefinitionPersister.processSuppliedDefinitions(clustername, buildInfo, appConf); + + // put the role counts into the resources file + Map argsRoleMap = buildInfo.getComponentMap(); + for (Map.Entry roleEntry : argsRoleMap.entrySet()) { + String count = roleEntry.getValue(); + String key = roleEntry.getKey(); + log.info("{} => {}", key, count); + resources.getOrAddComponent(key).put(COMPONENT_INSTANCES, count); + } + + //all CLI role options + Map> appOptionMap = + buildInfo.getCompOptionMap(); + appConf.mergeComponents(appOptionMap); + + //internal picks up core. values only + internal.propagateGlobalKeys(appConf, "slider."); + internal.propagateGlobalKeys(appConf, "internal."); + + //copy over role. and yarn. values ONLY to the resources + if (PROPAGATE_RESOURCE_OPTION) { + resources.propagateGlobalKeys(appConf, "component."); + resources.propagateGlobalKeys(appConf, "role."); + resources.propagateGlobalKeys(appConf, "yarn."); + resources.mergeComponentsPrefix(appOptionMap, "component.", true); + resources.mergeComponentsPrefix(appOptionMap, "yarn.", true); + resources.mergeComponentsPrefix(appOptionMap, "role.", true); + } + + // resource component args + appConf.merge(cmdLineResourceOptions); + resources.merge(cmdLineResourceOptions); + resources.mergeComponents(buildInfo.getResourceCompOptionMap()); + + builder.init(providerName, instanceDefinition); + builder.propagateFilename(); + builder.propagatePrincipals(); + builder.setImageDetailsIfAvailable(buildInfo.getImage(), + buildInfo.getAppHomeDir()); + builder.setQueue(buildInfo.queue); + + String quorum = buildInfo.getZKhosts(); + if (isUnset(quorum)) { + quorum = registryQuorum; + } + if (isUnset(quorum)) { + throw new BadConfigException(E_NO_ZOOKEEPER_QUORUM); + } + ZKPathBuilder zkPaths = new ZKPathBuilder(getAppName(), + getUsername(), + clustername, + registryQuorum, + quorum); + String zookeeperRoot = buildInfo.getAppZKPath(); + + if (isSet(zookeeperRoot)) { + zkPaths.setAppPath(zookeeperRoot); + } else { + String createDefaultZkNode = appConf.getGlobalOptions() + .getOption(AgentKeys.CREATE_DEF_ZK_NODE, "false"); + if (createDefaultZkNode.equals("true")) { + String defaultZKPath = createZookeeperNode(clustername, false); + log.debug("ZK node created for application instance: {}", defaultZKPath); + if (defaultZKPath != null) { + zkPaths.setAppPath(defaultZKPath); + } + } else { + // create AppPath if default is being used + String defaultZKPath = createZookeeperNode(clustername, true); + log.debug("ZK node assigned to application instance: {}", defaultZKPath); + zkPaths.setAppPath(defaultZKPath); + } + } + + builder.addZKBinding(zkPaths); + + //then propagate any package URI + if (buildInfo.packageURI != null) { + appConf.set(AgentKeys.PACKAGE_PATH, buildInfo.packageURI); + } + + propagatePythonExecutable(conf, instanceDefinition); + + // make any substitutions needed at this stage + replaceTokens(appConf.getConfTree(), getUsername(), clustername); + + // TODO: Refactor the validation code and persistence code + try { + persistInstanceDefinition(overwrite, appconfdir, builder); + appDefinitionPersister.persistPackages(); + + } catch (LockAcquireFailedException e) { + log.warn("Failed to get a Lock on {} : {}", builder, e, e); + throw new BadClusterStateException("Failed to save " + clustername + + ": " + e); + } + + // providers to validate what there is + // TODO: Validation should be done before persistence + AggregateConf instanceDescription = builder.getInstanceDescription(); + validateInstanceDefinition(sliderAM, instanceDescription, sliderFileSystem); + validateInstanceDefinition(provider, instanceDescription, sliderFileSystem); + } + + private void validateClientAndClusterResource(String clustername, + ConfTreeOperations clientResources) throws BadClusterStateException, + SliderException, IOException { + log.info("Validating upgrade resource definition with current cluster " + + "state (components and instance count)"); + Map clientComponentInstances = new HashMap<>(); + for (String componentName : clientResources.getComponentNames()) { + if (!SliderKeys.COMPONENT_AM.equals(componentName)) { + clientComponentInstances.put(componentName, clientResources + .getComponentOptInt(componentName, + COMPONENT_INSTANCES, -1)); + } + } + + AggregateConf clusterConf = null; + try { + clusterConf = loadPersistedClusterDescription(clustername); + } catch (LockAcquireFailedException e) { + log.warn("Failed to get a Lock on cluster resource : {}", e, e); + throw new BadClusterStateException( + "Failed to load client resource definition " + clustername + ": " + e, e); + } + Map clusterComponentInstances = new HashMap<>(); + for (Map.Entry> component : clusterConf + .getResources().components.entrySet()) { + if (!SliderKeys.COMPONENT_AM.equals(component.getKey())) { + clusterComponentInstances.put( + component.getKey(), + Integer.decode(component.getValue().get( + COMPONENT_INSTANCES))); + } + } + + // client and cluster should be an exact match + Iterator> clientComponentInstanceIt = clientComponentInstances + .entrySet().iterator(); + while (clientComponentInstanceIt.hasNext()) { + Map.Entry clientComponentInstanceEntry = clientComponentInstanceIt.next(); + if (clusterComponentInstances.containsKey(clientComponentInstanceEntry.getKey())) { + // compare instance count now and remove from both maps if they match + if (clusterComponentInstances + .get(clientComponentInstanceEntry.getKey()).intValue() == clientComponentInstanceEntry + .getValue().intValue()) { + clusterComponentInstances.remove(clientComponentInstanceEntry + .getKey()); + clientComponentInstanceIt.remove(); + } + } + } + + if (!clientComponentInstances.isEmpty() + || !clusterComponentInstances.isEmpty()) { + log.error("Mismatch found in upgrade resource definition and cluster " + + "resource state"); + if (!clientComponentInstances.isEmpty()) { + log.info("The upgrade resource definitions that do not match are:"); + for (Map.Entry clientComponentInstanceEntry : clientComponentInstances + .entrySet()) { + log.info(" Component Name: {}, Instance count: {}", + clientComponentInstanceEntry.getKey(), + clientComponentInstanceEntry.getValue()); + } + } + if (!clusterComponentInstances.isEmpty()) { + log.info("The cluster resources that do not match are:"); + for (Map.Entry clusterComponentInstanceEntry : clusterComponentInstances + .entrySet()) { + log.info(" Component Name: {}, Instance count: {}", + clusterComponentInstanceEntry.getKey(), + clusterComponentInstanceEntry.getValue()); + } + } + throw new BadConfigException("Resource definition provided for " + + "upgrade does not match with that of the currently running " + + "cluster.\nIf you are aware of what you are doing, rerun the " + + "command with " + Arguments.ARG_FORCE + " option."); + } + } + + protected void persistInstanceDefinition(boolean overwrite, + Path appconfdir, + InstanceBuilder builder) + throws IOException, SliderException, LockAcquireFailedException { + builder.persist(appconfdir, overwrite); + } + + @VisibleForTesting + public static void replaceTokens(ConfTree conf, + String userName, String clusterName) throws IOException { + Map newglobal = new HashMap<>(); + for (Entry entry : conf.global.entrySet()) { + newglobal.put(entry.getKey(), replaceTokens(entry.getValue(), + userName, clusterName)); + } + conf.global.putAll(newglobal); + + for (String component : conf.components.keySet()) { + Map newComponent = new HashMap<>(); + for (Entry entry : conf.components.get(component).entrySet()) { + newComponent.put(entry.getKey(), replaceTokens(entry.getValue(), + userName, clusterName)); + } + conf.components.get(component).putAll(newComponent); + } + + Map> newcred = new HashMap<>(); + for (Entry> entry : conf.credentials.entrySet()) { + List resultList = new ArrayList<>(); + for (String v : entry.getValue()) { + resultList.add(replaceTokens(v, userName, clusterName)); + } + newcred.put(replaceTokens(entry.getKey(), userName, clusterName), + resultList); + } + conf.credentials.clear(); + conf.credentials.putAll(newcred); + } + + private static String replaceTokens(String s, String userName, + String clusterName) throws IOException { + return s.replaceAll(Pattern.quote("${USER}"), userName) + .replaceAll(Pattern.quote("${USER_NAME}"), userName) + .replaceAll(Pattern.quote("${CLUSTER_NAME}"), clusterName); + } + + public FsPermission getClusterDirectoryPermissions(Configuration conf) { + String clusterDirPermsOct = + conf.get(CLUSTER_DIRECTORY_PERMISSIONS, DEFAULT_CLUSTER_DIRECTORY_PERMISSIONS); + return new FsPermission(clusterDirPermsOct); + } + + /** + * Verify that the Resource Manager is configured (on a non-HA cluster). + * with a useful error message + * @throws BadCommandArgumentsException the exception raised on an invalid config + */ + public void verifyBindingsDefined() throws BadCommandArgumentsException { + InetSocketAddress rmAddr = getRmAddress(getConfig()); + if (!getConfig().getBoolean(YarnConfiguration.RM_HA_ENABLED, false) + && !isAddressDefined(rmAddr)) { + throw new BadCommandArgumentsException( + E_NO_RESOURCE_MANAGER + + " in the argument " + + Arguments.ARG_MANAGER + + " or the configuration property " + + YarnConfiguration.RM_ADDRESS + + " value :" + rmAddr); + } + } + + /** + * Load and start a cluster specification. + * This assumes that all validation of args and cluster state + * have already taken place + * + * @param clustername name of the cluster. + * @param launchArgs launch arguments + * @return the exit code + * @throws YarnException + * @throws IOException + */ + protected int startCluster(String clustername, + LaunchArgsAccessor launchArgs) throws + YarnException, + IOException { + Path clusterDirectory = sliderFileSystem.buildClusterDirPath(clustername); + AggregateConf instanceDefinition = loadInstanceDefinitionUnresolved( + clustername, + clusterDirectory); + + LaunchedApplication launchedApplication = + launchApplication(clustername, clusterDirectory, instanceDefinition, + serviceArgs.isDebug()); + + if (launchArgs.getOutputFile() != null) { + // output file has been requested. Get the app report and serialize it + ApplicationReport report = + launchedApplication.getApplicationReport(); + SerializedApplicationReport sar = new SerializedApplicationReport(report); + sar.submitTime = System.currentTimeMillis(); + ApplicationReportSerDeser serDeser = new ApplicationReportSerDeser(); + serDeser.save(sar, launchArgs.getOutputFile()); + } + int waittime = launchArgs.getWaittime(); + if (waittime > 0) { + return waitForAppRunning(launchedApplication, waittime, waittime); + } else { + // no waiting + return EXIT_SUCCESS; + } + } + + /** + * Load the instance definition. It is not resolved at this point + * @param name cluster name + * @param clusterDirectory cluster dir + * @return the loaded configuration + * @throws IOException + * @throws SliderException + * @throws UnknownApplicationInstanceException if the file is not found + */ + public AggregateConf loadInstanceDefinitionUnresolved(String name, + Path clusterDirectory) throws IOException, SliderException { + + try { + AggregateConf definition = + InstanceIO.loadInstanceDefinitionUnresolved(sliderFileSystem, + clusterDirectory); + definition.setName(name); + return definition; + } catch (FileNotFoundException e) { + throw UnknownApplicationInstanceException.unknownInstance(name, e); + } + } + + /** + * Load the instance definition. + * @param name cluster name + * @param resolved flag to indicate the cluster should be resolved + * @return the loaded configuration + * @throws IOException IO problems + * @throws SliderException slider explicit issues + * @throws UnknownApplicationInstanceException if the file is not found + */ + public AggregateConf loadInstanceDefinition(String name, + boolean resolved) throws + IOException, + SliderException { + + Path clusterDirectory = sliderFileSystem.buildClusterDirPath(name); + AggregateConf instanceDefinition = loadInstanceDefinitionUnresolved( + name, + clusterDirectory); + if (resolved) { + instanceDefinition.resolve(); + } + return instanceDefinition; + + } + + protected AppMasterLauncher setupAppMasterLauncher(String clustername, + Path clusterDirectory, + AggregateConf instanceDefinition, + boolean debugAM) + throws YarnException, IOException{ + deployedClusterName = clustername; + validateClusterName(clustername); + verifyNoLiveClusters(clustername, "Launch"); + Configuration config = getConfig(); + lookupZKQuorum(); + boolean clusterSecure = isHadoopClusterSecure(config); + //create the Slider AM provider -this helps set up the AM + SliderAMClientProvider sliderAM = new SliderAMClientProvider(config); + + instanceDefinition.resolve(); + launchedInstanceDefinition = instanceDefinition; + + ConfTreeOperations internalOperations = instanceDefinition.getInternalOperations(); + MapOperations internalOptions = internalOperations.getGlobalOptions(); + ConfTreeOperations resourceOperations = instanceDefinition.getResourceOperations(); + ConfTreeOperations appOperations = instanceDefinition.getAppConfOperations(); + Path generatedConfDirPath = + createPathThatMustExist(internalOptions.getMandatoryOption( + INTERNAL_GENERATED_CONF_PATH)); + Path snapshotConfPath = + createPathThatMustExist(internalOptions.getMandatoryOption( + INTERNAL_SNAPSHOT_CONF_PATH)); + + + // cluster Provider + AbstractClientProvider provider = createClientProvider( + internalOptions.getMandatoryOption(INTERNAL_PROVIDER_NAME)); + if (log.isDebugEnabled()) { + log.debug(instanceDefinition.toString()); + } + MapOperations sliderAMResourceComponent = + resourceOperations.getOrAddComponent(SliderKeys.COMPONENT_AM); + MapOperations resourceGlobalOptions = resourceOperations.getGlobalOptions(); + + // add the tags if available + Set applicationTags = provider.getApplicationTags(sliderFileSystem, + getApplicationDefinitionPath(appOperations)); + + Credentials credentials = null; + if (clusterSecure) { + // pick up oozie credentials + credentials = CredentialUtils.loadTokensFromEnvironment(System.getenv(), + config); + if (credentials == null) { + // nothing from oozie, so build up directly + credentials = new Credentials( + UserGroupInformation.getCurrentUser().getCredentials()); + CredentialUtils.addRMRenewableFSDelegationTokens(config, + sliderFileSystem.getFileSystem(), + credentials); + CredentialUtils.addRMDelegationToken(yarnClient, credentials); + + } else { + log.info("Using externally supplied credentials to launch AM"); + } + } + + AppMasterLauncher amLauncher = new AppMasterLauncher(clustername, + SliderKeys.APP_TYPE, + config, + sliderFileSystem, + yarnClient, + clusterSecure, + sliderAMResourceComponent, + resourceGlobalOptions, + applicationTags, + credentials); + + ApplicationId appId = amLauncher.getApplicationId(); + // set the application name; + amLauncher.setKeepContainersOverRestarts(true); + + int maxAppAttempts = config.getInt(KEY_AM_RESTART_LIMIT, 0); + amLauncher.setMaxAppAttempts(maxAppAttempts); + + sliderFileSystem.purgeAppInstanceTempFiles(clustername); + Path tempPath = sliderFileSystem.createAppInstanceTempPath( + clustername, + appId.toString() + "/am"); + String libdir = "lib"; + Path libPath = new Path(tempPath, libdir); + sliderFileSystem.getFileSystem().mkdirs(libPath); + log.debug("FS={}, tempPath={}, libdir={}", sliderFileSystem, tempPath, libPath); + + // set local resources for the application master + // local files or archives as needed + // In this scenario, the jar file for the application master is part of the local resources + Map localResources = amLauncher.getLocalResources(); + + // look for the configuration directory named on the command line + boolean hasServerLog4jProperties = false; + Path remoteConfPath = null; + String relativeConfDir = null; + String confdirProp = System.getProperty(SliderKeys.PROPERTY_CONF_DIR); + if (isUnset(confdirProp)) { + log.debug("No local configuration directory provided as system property"); + } else { + File confDir = new File(confdirProp); + if (!confDir.exists()) { + throw new BadConfigException(E_CONFIGURATION_DIRECTORY_NOT_FOUND, + confDir); + } + Path localConfDirPath = createLocalPath(confDir); + remoteConfPath = new Path(clusterDirectory, SliderKeys.SUBMITTED_CONF_DIR); + log.debug("Slider configuration directory is {}; remote to be {}", + localConfDirPath, remoteConfPath); + copyDirectory(config, localConfDirPath, remoteConfPath, null); + + File log4jserver = + new File(confDir, SliderKeys.LOG4J_SERVER_PROP_FILENAME); + hasServerLog4jProperties = log4jserver.isFile(); + } + // the assumption here is that minimr cluster => this is a test run + // and the classpath can look after itself + + boolean usingMiniMRCluster = getUsingMiniMRCluster(); + if (!usingMiniMRCluster) { + + log.debug("Destination is not a MiniYARNCluster -copying full classpath"); + + // insert conf dir first + if (remoteConfPath != null) { + relativeConfDir = SliderKeys.SUBMITTED_CONF_DIR; + Map submittedConfDir = + sliderFileSystem.submitDirectory(remoteConfPath, + relativeConfDir); + mergeMaps(localResources, submittedConfDir); + } + } + // build up the configuration + // IMPORTANT: it is only after this call that site configurations + // will be valid. + + propagatePrincipals(config, instanceDefinition); + // validate security data + +/* + // turned off until tested + SecurityConfiguration securityConfiguration = + new SecurityConfiguration(config, + instanceDefinition, clustername); + +*/ + Configuration clientConfExtras = new Configuration(false); + // then build up the generated path. + FsPermission clusterPerms = getClusterDirectoryPermissions(config); + copyDirectory(config, snapshotConfPath, generatedConfDirPath, + clusterPerms); + + + // standard AM resources + sliderAM.prepareAMAndConfigForLaunch(sliderFileSystem, + config, + amLauncher, + instanceDefinition, + snapshotConfPath, + generatedConfDirPath, + clientConfExtras, + libdir, + tempPath, + usingMiniMRCluster); + //add provider-specific resources + provider.prepareAMAndConfigForLaunch(sliderFileSystem, + config, + amLauncher, + instanceDefinition, + snapshotConfPath, + generatedConfDirPath, + clientConfExtras, + libdir, + tempPath, + usingMiniMRCluster); + + // now that the site config is fully generated, the provider gets + // to do a quick review of them. + log.debug("Preflight validation of cluster configuration"); + + + sliderAM.preflightValidateClusterConfiguration(sliderFileSystem, + clustername, + config, + instanceDefinition, + clusterDirectory, + generatedConfDirPath, + clusterSecure + ); + + provider.preflightValidateClusterConfiguration(sliderFileSystem, + clustername, + config, + instanceDefinition, + clusterDirectory, + generatedConfDirPath, + clusterSecure + ); + + + // TODO: consider supporting apps that don't have an image path + Path imagePath = + extractImagePath(sliderFileSystem, internalOptions); + if (sliderFileSystem.maybeAddImagePath(localResources, imagePath)) { + log.debug("Registered image path {}", imagePath); + } + + // build the environment + amLauncher.putEnv( + buildEnvMap(sliderAMResourceComponent)); + ClasspathConstructor classpath = buildClasspath(relativeConfDir, + libdir, + getConfig(), + sliderFileSystem, + usingMiniMRCluster); + amLauncher.setClasspath(classpath); + //add english env + amLauncher.setEnv("LANG", "en_US.UTF-8"); + amLauncher.setEnv("LC_ALL", "en_US.UTF-8"); + amLauncher.setEnv("LANGUAGE", "en_US.UTF-8"); + amLauncher.maybeSetEnv(HADOOP_JAAS_DEBUG, + System.getenv(HADOOP_JAAS_DEBUG)); + amLauncher.putEnv(getAmLaunchEnv(config)); + + for (Map.Entry envs : getSystemEnv().entrySet()) { + log.debug("System env {}={}", envs.getKey(), envs.getValue()); + } + if (log.isDebugEnabled()) { + log.debug("AM classpath={}", classpath); + log.debug("Environment Map:\n{}", + stringifyMap(amLauncher.getEnv())); + log.debug("Files in lib path\n{}", sliderFileSystem.listFSDir(libPath)); + } + + // rm address + + InetSocketAddress rmSchedulerAddress; + try { + rmSchedulerAddress = getRmSchedulerAddress(config); + } catch (IllegalArgumentException e) { + throw new BadConfigException("%s Address invalid: %s", + YarnConfiguration.RM_SCHEDULER_ADDRESS, + config.get(YarnConfiguration.RM_SCHEDULER_ADDRESS)); + } + String rmAddr = NetUtils.getHostPortString(rmSchedulerAddress); + + JavaCommandLineBuilder commandLine = new JavaCommandLineBuilder(); + // insert any JVM options); + sliderAM.addJVMOptions(instanceDefinition, commandLine); + // enable asserts + commandLine.enableJavaAssertions(); + + // if the conf dir has a log4j-server.properties, switch to that + if (hasServerLog4jProperties) { + commandLine.sysprop(SYSPROP_LOG4J_CONFIGURATION, LOG4J_SERVER_PROP_FILENAME); + commandLine.sysprop(SYSPROP_LOG_DIR, ApplicationConstants.LOG_DIR_EXPANSION_VAR); + } + + // add the AM sevice entry point + commandLine.add(SliderAppMaster.SERVICE_CLASSNAME); + + // create action and the cluster name + commandLine.add(ACTION_CREATE, clustername); + + // debug + if (debugAM) { + commandLine.add(Arguments.ARG_DEBUG); + } + + // set the cluster directory path + commandLine.add(Arguments.ARG_CLUSTER_URI, clusterDirectory.toUri()); + + if (!isUnset(rmAddr)) { + commandLine.add(Arguments.ARG_RM_ADDR, rmAddr); + } + + if (serviceArgs.getFilesystemBinding() != null) { + commandLine.add(Arguments.ARG_FILESYSTEM, serviceArgs.getFilesystemBinding()); + } + + // pass the registry binding + commandLine.addConfOptionToCLI(config, RegistryConstants.KEY_REGISTRY_ZK_ROOT, + RegistryConstants.DEFAULT_ZK_REGISTRY_ROOT); + commandLine.addMandatoryConfOption(config, RegistryConstants.KEY_REGISTRY_ZK_QUORUM); + + if (clusterSecure) { + // if the cluster is secure, make sure that + // the relevant security settings go over + commandLine.addConfOption(config, DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY); + } + + // copy over any/all YARN RM client values, in case the server-side XML conf file + // has the 0.0.0.0 address + commandLine.addConfOptions(config, + YarnConfiguration.RM_ADDRESS, + YarnConfiguration.RM_CLUSTER_ID, + YarnConfiguration.RM_HOSTNAME, + YarnConfiguration.RM_PRINCIPAL); + + // write out the path output + commandLine.addOutAndErrFiles(STDOUT_AM, STDERR_AM); + + String cmdStr = commandLine.build(); + log.debug("Completed setting up app master command {}", cmdStr); + + amLauncher.addCommandLine(commandLine); + + // the Slider AM gets to configure the AM requirements, not the custom provider + sliderAM.prepareAMResourceRequirements(sliderAMResourceComponent, + amLauncher.getResource()); + + + // Set the priority for the application master + amLauncher.setPriority(config.getInt(KEY_YARN_QUEUE_PRIORITY, + DEFAULT_YARN_QUEUE_PRIORITY)); + + // Set the queue to which this application is to be submitted in the RM + // Queue for App master + String amQueue = config.get(KEY_YARN_QUEUE, DEFAULT_YARN_QUEUE); + String suppliedQueue = internalOperations.getGlobalOptions().get(INTERNAL_QUEUE); + if(!isUnset(suppliedQueue)) { + amQueue = suppliedQueue; + log.info("Using queue {} for the application instance.", amQueue); + } + + if (isSet(amQueue)) { + amLauncher.setQueue(amQueue); + } + return amLauncher; + } + + /** + * + * @param clustername name of the cluster + * @param clusterDirectory cluster dir + * @param instanceDefinition the instance definition + * @param debugAM enable debug AM options + * @return the launched application + * @throws YarnException + * @throws IOException + */ + public LaunchedApplication launchApplication(String clustername, + Path clusterDirectory, + AggregateConf instanceDefinition, + boolean debugAM) + throws YarnException, IOException { + + AppMasterLauncher amLauncher = setupAppMasterLauncher(clustername, + clusterDirectory, + instanceDefinition, + debugAM); + + applicationId = amLauncher.getApplicationId(); + log.info("Submitting application {}", applicationId); + + // submit the application + LaunchedApplication launchedApplication = amLauncher.submitApplication(); + return launchedApplication; + } + + protected Map getAmLaunchEnv(Configuration config) { + String sliderAmLaunchEnv = config.get(KEY_AM_LAUNCH_ENV); + log.debug("{} = {}", KEY_AM_LAUNCH_ENV, sliderAmLaunchEnv); + // Multiple env variables can be specified with a comma (,) separator + String[] envs = StringUtils.isEmpty(sliderAmLaunchEnv) ? null + : sliderAmLaunchEnv.split(","); + if (ArrayUtils.isEmpty(envs)) { + return Collections.emptyMap(); + } + Map amLaunchEnv = new HashMap<>(); + for (String env : envs) { + if (StringUtils.isNotEmpty(env)) { + // Each env name/value is separated by equals sign (=) + String[] tokens = env.split("="); + if (tokens != null && tokens.length == 2) { + String envKey = tokens[0]; + String envValue = tokens[1]; + for (Map.Entry placeholder : generatePlaceholderKeyValueMap( + env).entrySet()) { + if (StringUtils.isNotEmpty(placeholder.getValue())) { + envValue = envValue.replaceAll( + Pattern.quote(placeholder.getKey()), placeholder.getValue()); + } + } + if (Shell.WINDOWS) { + envValue = "%" + envKey + "%;" + envValue; + } else { + envValue = "$" + envKey + ":" + envValue; + } + log.info("Setting AM launch env {}={}", envKey, envValue); + amLaunchEnv.put(envKey, envValue); + } + } + } + return amLaunchEnv; + } + + protected Map generatePlaceholderKeyValueMap(String env) { + String PLACEHOLDER_PATTERN = "\\$\\{[^{]+\\}"; + Pattern placeholderPattern = Pattern.compile(PLACEHOLDER_PATTERN); + Matcher placeholderMatcher = placeholderPattern.matcher(env); + Map placeholderKeyValueMap = new HashMap(); + if (placeholderMatcher.find()) { + String placeholderKey = placeholderMatcher.group(); + String systemKey = placeholderKey + .substring(2, placeholderKey.length() - 1).toUpperCase(Locale.ENGLISH) + .replaceAll("\\.", "_"); + String placeholderValue = getSystemEnv(systemKey); + log.debug("Placeholder {}={}", placeholderKey, placeholderValue); + placeholderKeyValueMap.put(placeholderKey, placeholderValue); + } + return placeholderKeyValueMap; + } + + private void propagatePythonExecutable(Configuration config, + AggregateConf instanceDefinition) { + String pythonExec = config.get( + PYTHON_EXECUTABLE_PATH); + if (pythonExec != null) { + instanceDefinition.getAppConfOperations().getGlobalOptions().putIfUnset( + PYTHON_EXECUTABLE_PATH, + pythonExec); + } + } + + + /** + * Wait for the launched app to be accepted in the time + * and, optionally running. + *

+ * If the application + * + * @param launchedApplication application + * @param acceptWaitMillis time in millis to wait for accept + * @param runWaitMillis time in millis to wait for the app to be running. + * May be null, in which case no wait takes place + * @return exit code: success + * @throws YarnException + * @throws IOException + */ + public int waitForAppRunning(LaunchedApplication launchedApplication, + int acceptWaitMillis, int runWaitMillis) throws YarnException, IOException { + assert launchedApplication != null; + int exitCode; + // wait for the submit state to be reached + ApplicationReport report = launchedApplication.monitorAppToState( + YarnApplicationState.ACCEPTED, + new Duration(acceptWaitMillis)); + + // may have failed, so check that + if (hasAppFinished(report)) { + exitCode = buildExitCode(report); + } else { + // exit unless there is a wait + + + if (runWaitMillis != 0) { + // waiting for state to change + Duration duration = new Duration(runWaitMillis * 1000); + duration.start(); + report = launchedApplication.monitorAppToState( + YarnApplicationState.RUNNING, duration); + if (report != null && + report.getYarnApplicationState() == YarnApplicationState.RUNNING) { + exitCode = EXIT_SUCCESS; + } else { + exitCode = buildExitCode(report); + } + } else { + exitCode = EXIT_SUCCESS; + } + } + return exitCode; + } + + + /** + * Propagate any critical principals from the current site config down to the HBase one. + * @param config config to read from + * @param clusterSpec cluster spec + */ + private void propagatePrincipals(Configuration config, + AggregateConf clusterSpec) { + String dfsPrincipal = config.get(DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY); + if (dfsPrincipal != null) { + String siteDfsPrincipal = SITE_XML_PREFIX + DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY; + clusterSpec.getAppConfOperations().getGlobalOptions().putIfUnset( + siteDfsPrincipal, + dfsPrincipal); + } + } + + /** + * Create a path that must exist in the cluster fs + * @param uri uri to create + * @return the path + * @throws FileNotFoundException if the path does not exist + */ + public Path createPathThatMustExist(String uri) throws + SliderException, IOException { + return sliderFileSystem.createPathThatMustExist(uri); + } + + /** + * verify that a live cluster isn't there + * @param clustername cluster name + * @param action + * @throws SliderException with exit code EXIT_CLUSTER_LIVE + * if a cluster of that name is either live or starting up. + */ + public void verifyNoLiveClusters(String clustername, String action) throws + IOException, + YarnException { + List existing = findAllLiveInstances(clustername); + + if (!existing.isEmpty()) { + throw new SliderException(EXIT_APPLICATION_IN_USE, + action +" failed for " + + clustername + + ": " + + E_CLUSTER_RUNNING + " :" + + existing.get(0)); + } + } + + public String getUsername() throws IOException { + return RegistryUtils.currentUser(); + } + + /** + * Get the name of any deployed cluster + * @return the cluster name + */ + public String getDeployedClusterName() { + return deployedClusterName; + } + + @VisibleForTesting + public void setDeployedClusterName(String deployedClusterName) { + this.deployedClusterName = deployedClusterName; + } + + /** + * ask if the client is using a mini MR cluster + * @return true if they are + */ + private boolean getUsingMiniMRCluster() { + return getConfig().getBoolean(YarnConfiguration.IS_MINI_YARN_CLUSTER, + false); + } + + /** + * Get the application name used in the zookeeper root paths + * @return an application-specific path in ZK + */ + private String getAppName() { + return "slider"; + } + + /** + * Wait for the app to start running (or go past that state) + * @param duration time to wait + * @return the app report; null if the duration turned out + * @throws YarnException YARN or app issues + * @throws IOException IO problems + */ + @VisibleForTesting + public ApplicationReport monitorAppToRunning(Duration duration) + throws YarnException, IOException { + return monitorAppToState(YarnApplicationState.RUNNING, duration); + } + + /** + * Build an exit code for an application from its report. + * If the report parameter is null, its interpreted as a timeout + * @param report report application report + * @return the exit code + * @throws IOException + * @throws YarnException + */ + private int buildExitCode(ApplicationReport report) throws + IOException, + YarnException { + if (null == report) { + return EXIT_TIMED_OUT; + } + + YarnApplicationState state = report.getYarnApplicationState(); + FinalApplicationStatus dsStatus = report.getFinalApplicationStatus(); + switch (state) { + case FINISHED: + if (FinalApplicationStatus.SUCCEEDED == dsStatus) { + log.info("Application has completed successfully"); + return EXIT_SUCCESS; + } else { + log.info("Application finished unsuccessfully." + + "YarnState = {}, DSFinalStatus = {} Breaking monitoring loop", + state, dsStatus); + return EXIT_YARN_SERVICE_FINISHED_WITH_ERROR; + } + + case KILLED: + log.info("Application did not finish. YarnState={}, DSFinalStatus={}", + state, dsStatus); + return EXIT_YARN_SERVICE_KILLED; + + case FAILED: + log.info("Application Failed. YarnState={}, DSFinalStatus={}", state, + dsStatus); + return EXIT_YARN_SERVICE_FAILED; + + default: + //not in any of these states + return EXIT_SUCCESS; + } + } + + /** + * Monitor the submitted application for reaching the requested state. + * Will also report if the app reaches a later state (failed, killed, etc) + * Kill application if duration!= null & time expires. + * Prerequisite: the applicatin was launched. + * @param desiredState desired state. + * @param duration how long to wait -must be more than 0 + * @return the application report -null on a timeout + * @throws YarnException + * @throws IOException + */ + @VisibleForTesting + public ApplicationReport monitorAppToState( + YarnApplicationState desiredState, + Duration duration) + throws YarnException, IOException { + LaunchedApplication launchedApplication = + new LaunchedApplication(applicationId, yarnClient); + return launchedApplication.monitorAppToState(desiredState, duration); + } + + @Override + public ApplicationReport getApplicationReport() throws + IOException, + YarnException { + return getApplicationReport(applicationId); + } + + @Override + public boolean forceKillApplication(String reason) + throws YarnException, IOException { + if (applicationId != null) { + new LaunchedApplication(applicationId, yarnClient).forceKill(reason); + return true; + } + return false; + } + + /** + * List Slider instances belonging to a specific user. This will include + * failed and killed instances; there may be duplicates + * @param user user: "" means all users, null means "default" + * @return a possibly empty list of Slider AMs + */ + + public List listSliderInstances(String user) + throws YarnException, IOException { + return yarnAppListClient.listInstances(user); + } + + /** + * A basic list action to list live instances + * @param clustername cluster name + * @return success if the listing was considered successful + * @throws IOException + * @throws YarnException + */ + public int actionList(String clustername) throws IOException, YarnException { + ActionListArgs args = new ActionListArgs(); + args.live = true; + return actionList(clustername, args); + } + + /** + * Implement the list action. + * @param clustername List out specific instance name + * @param args Action list arguments + * @return 0 if one or more entries were listed + * @throws IOException + * @throws YarnException + * @throws UnknownApplicationInstanceException if a specific instance + * was named but it was not found + */ + @Override + public int actionList(String clustername, ActionListArgs args) + throws IOException, YarnException { + Set appInstances = getApplicationList(clustername, args); + // getApplicationList never returns null + return !appInstances.isEmpty() ? EXIT_SUCCESS + : ((appInstances.isEmpty() && isUnset(clustername)) ? EXIT_SUCCESS + : EXIT_FALSE); + } + + /** + * Retrieve a list of all live instances. If clustername is supplied then it + * returns this specific cluster, if and only if it exists and is live. + * + * @param clustername + * cluster name (if looking for a specific live cluster) + * @return the list of application names which satisfies the list criteria + * @throws IOException + * @throws YarnException + */ + public Set getApplicationList(String clustername) throws IOException, + YarnException { + ActionListArgs args = new ActionListArgs(); + args.live = true; + return getApplicationList(clustername, args); + } + + /** + * Retrieve a list of application instances satisfying the query criteria. + * + * @param clustername + * List out specific instance name (set null for all) + * @param args + * Action list arguments + * @return the list of application names which satisfies the list criteria + * @throws IOException + * @throws YarnException + * @throws UnknownApplicationInstanceException + * if a specific instance was named but it was not found + */ + public Set getApplicationList(String clustername, ActionListArgs args) + throws IOException, YarnException { + if (args.help) { + actionHelp(ACTION_LIST); + // the above call throws an exception so the return is not really required + return Collections.emptySet(); + } + verifyBindingsDefined(); + + boolean live = args.live; + String state = args.state; + boolean listContainers = args.containers; + boolean verbose = args.verbose; + String version = args.version; + Set components = args.components; + + if (live && !state.isEmpty()) { + throw new BadCommandArgumentsException( + Arguments.ARG_LIVE + " and " + Arguments.ARG_STATE + " are exclusive"); + } + if (listContainers && isUnset(clustername)) { + throw new BadCommandArgumentsException( + "Should specify an application instance with " + + Arguments.ARG_CONTAINERS); + } + // specifying both --version and --components with --containers is okay + if (StringUtils.isNotEmpty(version) && !listContainers) { + throw new BadCommandArgumentsException(Arguments.ARG_VERSION + + " can be specified only with " + Arguments.ARG_CONTAINERS); + } + if (!components.isEmpty() && !listContainers) { + throw new BadCommandArgumentsException(Arguments.ARG_COMPONENTS + + " can be specified only with " + Arguments.ARG_CONTAINERS); + } + + // flag to indicate only services in a specific state are to be listed + boolean listOnlyInState = live || !state.isEmpty(); + + YarnApplicationState min, max; + if (live) { + min = YarnApplicationState.NEW; + max = YarnApplicationState.RUNNING; + } else if (!state.isEmpty()) { + YarnApplicationState stateVal = extractYarnApplicationState(state); + min = max = stateVal; + } else { + min = YarnApplicationState.NEW; + max = YarnApplicationState.KILLED; + } + // get the complete list of persistent instances + Map persistentInstances = sliderFileSystem.listPersistentInstances(); + + if (persistentInstances.isEmpty() && isUnset(clustername)) { + // an empty listing is a success if no cluster was named + log.debug("No application instances found"); + return Collections.emptySet(); + } + + // and those the RM knows about + List instances = listSliderInstances(null); + sortApplicationsByMostRecent(instances); + Map reportMap = + buildApplicationReportMap(instances, min, max); + log.debug("Persisted {} deployed {} filtered[{}-{}] & de-duped to {}", + persistentInstances.size(), + instances.size(), + min, max, + reportMap.size() ); + + List containers = null; + if (isSet(clustername)) { + // only one instance is expected + // resolve the persistent value + Path persistent = persistentInstances.get(clustername); + if (persistent == null) { + throw unknownClusterException(clustername); + } + // create a new map with only that instance in it. + // this restricts the output of results to this instance + persistentInstances = new HashMap<>(); + persistentInstances.put(clustername, persistent); + if (listContainers) { + containers = getContainers(clustername); + } + } + + // at this point there is either the entire list or a stripped down instance + Set listedInstances = new HashSet(); + for (String name : persistentInstances.keySet()) { + ApplicationReport report = reportMap.get(name); + if (!listOnlyInState || report != null) { + // list the details if all were requested, or the filtering contained + // a report + listedInstances.add(name); + // containers will be non-null when only one instance is requested + String details = instanceDetailsToString(name, report, + containers, version, components, verbose); + print(details); + } + } + + return listedInstances; + } + + public List getContainers(String name) + throws YarnException, IOException { + SliderClusterOperations clusterOps = new SliderClusterOperations( + bondToCluster(name)); + try { + return clusterOps.getContainers(); + } catch (NoSuchNodeException e) { + throw new BadClusterStateException( + "Containers not found for application instance %s", name); + } + } + + /** + * Enumerate slider instances for the current user, and the + * most recent app report, where available. + * @param listOnlyInState boolean to indicate that the instances should + * only include those in a YARN state + * minAppState <= currentState <= maxAppState + * + * @param minAppState minimum application state to include in enumeration. + * @param maxAppState maximum application state to include + * @return a map of application instance name to description + * @throws IOException Any IO problem + * @throws YarnException YARN problems + */ + @Override + public Map enumSliderInstances( + boolean listOnlyInState, + YarnApplicationState minAppState, + YarnApplicationState maxAppState) + throws IOException, YarnException { + return yarnAppListClient.enumSliderInstances(listOnlyInState, + minAppState, + maxAppState); + } + + /** + * Extract the state of a Yarn application --state argument + * @param state state argument + * @return the application state + * @throws BadCommandArgumentsException if the argument did not match + * any known state + */ + private YarnApplicationState extractYarnApplicationState(String state) throws + BadCommandArgumentsException { + YarnApplicationState stateVal; + try { + stateVal = YarnApplicationState.valueOf(state.toUpperCase(Locale.ENGLISH)); + } catch (IllegalArgumentException e) { + throw new BadCommandArgumentsException("Unknown state: " + state); + + } + return stateVal; + } + + /** + * Is an application active: accepted or running + * @param report the application report + * @return true if it is running or scheduled to run. + */ + public boolean isApplicationActive(ApplicationReport report) { + return report.getYarnApplicationState() == YarnApplicationState.RUNNING + || report.getYarnApplicationState() == YarnApplicationState.ACCEPTED; + } + + /** + * Implement the islive action: probe for a cluster of the given name existing + * @return exit code + */ + + @Override + @VisibleForTesting + public int actionFlex(String name, ActionFlexArgs args) throws YarnException, IOException { + validateClusterName(name); + Map roleMap = args.getComponentMap(); + // throw usage exception if no changes proposed + if (roleMap.size() == 0) { + actionHelp(ACTION_FLEX); + } + verifyBindingsDefined(); + log.debug("actionFlex({})", name); + Map roleInstances = new HashMap<>(); + for (Map.Entry roleEntry : roleMap.entrySet()) { + String key = roleEntry.getKey(); + String val = roleEntry.getValue(); + roleInstances.put(key, val); + } + return flex(name, roleInstances); + } + + @Override + public int actionExists(String name, boolean checkLive) throws YarnException, IOException { + ActionExistsArgs args = new ActionExistsArgs(); + args.live = checkLive; + return actionExists(name, args); + } + + public int actionExists(String name, ActionExistsArgs args) throws YarnException, IOException { + verifyBindingsDefined(); + validateClusterName(name); + boolean checkLive = args.live; + log.debug("actionExists({}, {}, {})", name, checkLive, args.state); + + //initial probe for a cluster in the filesystem + Path clusterDirectory = sliderFileSystem.buildClusterDirPath(name); + if (!sliderFileSystem.getFileSystem().exists(clusterDirectory)) { + throw unknownClusterException(name); + } + String state = args.state; + if (!checkLive && isUnset(state)) { + log.info("Application {} exists", name); + return EXIT_SUCCESS; + } + + //test for liveness/state + boolean inDesiredState = false; + ApplicationReport instance; + instance = findInstance(name); + if (instance == null) { + log.info("Application {} not running", name); + return EXIT_FALSE; + } + if (checkLive) { + // the app exists, check that it is not in any terminated state + YarnApplicationState appstate = instance.getYarnApplicationState(); + log.debug(" current app state = {}", appstate); + inDesiredState = + appstate.ordinal() < YarnApplicationState.FINISHED.ordinal(); + } else { + // scan for instance in single --state state + List userInstances = yarnClient.listDeployedInstances(""); + state = state.toUpperCase(Locale.ENGLISH); + YarnApplicationState desiredState = extractYarnApplicationState(state); + ApplicationReport foundInstance = + yarnClient.findAppInInstanceList(userInstances, name, desiredState); + if (foundInstance != null) { + // found in selected state: success + inDesiredState = true; + // mark this as the instance to report + instance = foundInstance; + } + } + + OnDemandReportStringifier report = + new OnDemandReportStringifier(instance); + if (!inDesiredState) { + //cluster in the list of apps but not running + log.info("Application {} found but is in wrong state {}", name, + instance.getYarnApplicationState()); + log.debug("State {}", report); + return EXIT_FALSE; + } else { + log.debug("Application instance is in desired state"); + log.info("Application {} is {}\n{}", name, + instance.getYarnApplicationState(), report); + return EXIT_SUCCESS; + } + } + + + @Override + public int actionKillContainer(String name, + ActionKillContainerArgs args) throws YarnException, IOException { + String id = args.id; + if (isUnset(id)) { + throw new BadCommandArgumentsException("Missing container id"); + } + log.info("killingContainer {}:{}", name, id); + SliderClusterOperations clusterOps = + new SliderClusterOperations(bondToCluster(name)); + try { + clusterOps.killContainer(id); + } catch (NoSuchNodeException e) { + throw new BadClusterStateException("Container %s not found in cluster %s", + id, name); + } + return EXIT_SUCCESS; + } + + @Override + public String actionEcho(String name, ActionEchoArgs args) throws + YarnException, + IOException { + String message = args.message; + if (message == null) { + throw new BadCommandArgumentsException("missing message"); + } + SliderClusterOperations clusterOps = + new SliderClusterOperations(bondToCluster(name)); + return clusterOps.echo(message); + } + + /** + * Get at the service registry operations + * @return registry client -valid after the service is inited. + */ + public YarnAppListClient getYarnAppListClient() { + return yarnAppListClient; + } + + /** + * Find an instance of an application belonging to the current user + * @param appname application name + * @return the app report or null if none is found + * @throws YarnException YARN issues + * @throws IOException IO problems + */ + private ApplicationReport findInstance(String appname) + throws YarnException, IOException { + return yarnAppListClient.findInstance(appname); + } + + private RunningApplication findApplication(String appname) + throws YarnException, IOException { + ApplicationReport applicationReport = findInstance(appname); + return applicationReport != null ? + new RunningApplication(yarnClient, applicationReport): null; + } + + /** + * find all live instances of a specific app -if there is >1 in the cluster, + * this returns them all. State should be running or less + * @param appname application name + * @return the list of all matching application instances + */ + private List findAllLiveInstances(String appname) + throws YarnException, IOException { + + return yarnAppListClient.findAllLiveInstances(appname); + } + + /** + * Connect to a Slider AM + * @param app application report providing the details on the application + * @return an instance + * @throws YarnException + * @throws IOException + */ + private SliderClusterProtocol connect(ApplicationReport app) + throws YarnException, IOException { + + try { + return RpcBinder.getProxy(getConfig(), + yarnClient.getRmClient(), + app, + Constants.CONNECT_TIMEOUT, + Constants.RPC_TIMEOUT); + } catch (InterruptedException e) { + throw new SliderException(SliderExitCodes.EXIT_TIMED_OUT, + e, + "Interrupted waiting for communications with the Slider AM"); + } + } + + @Override + @VisibleForTesting + public int actionStatus(String clustername, ActionStatusArgs statusArgs) throws + YarnException, + IOException { + verifyBindingsDefined(); + validateClusterName(clustername); + String outfile = statusArgs.getOutput(); + ClusterDescription status = getClusterDescription(clustername); + String text = status.toJsonString(); + if (outfile == null) { + log.info(text); + } else { + status.save(new File(outfile).getAbsoluteFile()); + } + return EXIT_SUCCESS; + } + + @Override + public int actionVersion() { + SliderVersionInfo.loadAndPrintVersionInfo(log); + return EXIT_SUCCESS; + } + + @Override + public int actionFreeze(String clustername, + ActionFreezeArgs freezeArgs) throws YarnException, IOException { + verifyBindingsDefined(); + validateClusterName(clustername); + int waittime = freezeArgs.getWaittime(); + String text = freezeArgs.message; + boolean forcekill = freezeArgs.force; + log.debug("actionFreeze({}, reason={}, wait={}, force={})", clustername, + text, + waittime, + forcekill); + + //is this actually a known cluster? + sliderFileSystem.locateInstanceDefinition(clustername); + ApplicationReport app = findInstance(clustername); + if (app == null) { + // exit early + log.info("Cluster {} not running", clustername); + // not an error to stop a stopped cluster + return EXIT_SUCCESS; + } + log.debug("App to stop was found: {}:\n{}", clustername, + new OnDemandReportStringifier(app)); + if (app.getYarnApplicationState().ordinal() >= + YarnApplicationState.FINISHED.ordinal()) { + log.info("Cluster {} is in a terminated state {}", clustername, + app.getYarnApplicationState()); + return EXIT_SUCCESS; + } + + // IPC request for a managed shutdown is only possible if the app is running. + // so we need to force kill if the app is accepted or submitted + if (!forcekill + && app.getYarnApplicationState().ordinal() < YarnApplicationState.RUNNING.ordinal()) { + log.info("Cluster {} is in a pre-running state {}. Force killing it", clustername, + app.getYarnApplicationState()); + forcekill = true; + } + + LaunchedApplication application = new LaunchedApplication(yarnClient, app); + applicationId = application.getApplicationId(); + + if (forcekill) { + // escalating to forced kill + application.kill("Forced stop of " + clustername + ": " + text); + } else { + try { + SliderClusterProtocol appMaster = connect(app); + Messages.StopClusterRequestProto r = + Messages.StopClusterRequestProto + .newBuilder() + .setMessage(text) + .build(); + appMaster.stopCluster(r); + + log.debug("Cluster stop command issued"); + + } catch (YarnException e) { + log.warn("Exception while trying to terminate {}", clustername, e); + return EXIT_FALSE; + } catch (IOException e) { + log.warn("Exception while trying to terminate {}", clustername, e); + return EXIT_FALSE; + } + } + + //wait for completion. We don't currently return an exception during this process + //as the stop operation has been issued, this is just YARN. + try { + if (waittime > 0) { + ApplicationReport applicationReport = + application.monitorAppToState(YarnApplicationState.FINISHED, + new Duration(waittime * 1000)); + if (applicationReport == null) { + log.info("application did not shut down in time"); + return EXIT_FALSE; + } + } + + } catch (YarnException | IOException e) { + log.warn("Exception while waiting for the application {} to shut down: {}", + clustername, e); + } + + return EXIT_SUCCESS; + } + + @Override + public int actionThaw(String clustername, ActionThawArgs thaw) throws YarnException, IOException { + validateClusterName(clustername); + verifyBindingsDefined(); + // see if it is actually running and bail out; + verifyNoLiveClusters(clustername, "Start"); + + //start the cluster + return startCluster(clustername, thaw); + } + + /** + * Implement flexing + * @param clustername name of the cluster + * @param roleInstances map of new role instances + * @return EXIT_SUCCESS if the #of nodes in a live cluster changed + * @throws YarnException + * @throws IOException + */ + public int flex(String clustername, Map roleInstances) + throws YarnException, IOException { + verifyBindingsDefined(); + validateClusterName(clustername); + Path clusterDirectory = sliderFileSystem.buildClusterDirPath(clustername); + AggregateConf instanceDefinition = loadInstanceDefinitionUnresolved( + clustername, + clusterDirectory); + + ConfTreeOperations resources = + instanceDefinition.getResourceOperations(); + for (Map.Entry entry : roleInstances.entrySet()) { + String role = entry.getKey(); + String updateCountStr = entry.getValue(); + int currentCount = 0; + MapOperations component = resources.getOrAddComponent(role); + try { + // check if a relative count is specified + if (updateCountStr.startsWith("+") || updateCountStr.startsWith("-")) { + int updateCount = Integer.parseInt(updateCountStr); + // if component was specified before, get the current count + if (component.get(COMPONENT_INSTANCES) != null) { + currentCount = Integer.valueOf(component.get(COMPONENT_INSTANCES)); + if (currentCount + updateCount < 0) { + throw new BadCommandArgumentsException("The requested count " + + "of \"%s\" for role %s makes the total number of " + + "instances negative: \"%s\"", updateCount, role, + currentCount+updateCount); + } + else { + component.put(COMPONENT_INSTANCES, + Integer.toString(currentCount+updateCount)); + } + } + else { + if (updateCount < 0) { + throw new BadCommandArgumentsException("Invalid to request " + + "negative count of \"%s\" for role %s", updateCount, role); + } + else { + Map map = new HashMap<>(); + resources.confTree.components.put(role, map); + component = new MapOperations(role, map); + component.put(COMPONENT_INSTANCES, Integer.toString(updateCount)); + } + } + } + else { + int count = Integer.parseInt(updateCountStr); + resources.getOrAddComponent(role).put(COMPONENT_INSTANCES, + Integer.toString(count)); + } + } + catch (NumberFormatException e) { + throw new BadCommandArgumentsException("Requested count of role %s" + + " is not a number: \"%s\"", + role, updateCountStr); + } + + log.debug("Flexed cluster specification ( {} -> {}) : \n{}", + role, + updateCountStr, + resources); + } + SliderAMClientProvider sliderAM = new SliderAMClientProvider(getConfig()); + AbstractClientProvider provider = createClientProvider( + instanceDefinition.getInternalOperations().getGlobalOptions().getMandatoryOption( + INTERNAL_PROVIDER_NAME)); + // slider provider to validate what there is + validateInstanceDefinition(sliderAM, instanceDefinition, sliderFileSystem); + validateInstanceDefinition(provider, instanceDefinition, sliderFileSystem); + + int exitCode = EXIT_FALSE; + // save the specification + try { + InstanceIO.saveInstanceDefinition(sliderFileSystem, clusterDirectory, + instanceDefinition); + } catch (LockAcquireFailedException e) { + // lock failure + log.debug("Failed to lock dir {}", clusterDirectory, e); + log.warn("Failed to save new resource definition to {} : {}", clusterDirectory, e); + } + + // now see if it is actually running and tell it about the update if it is + ApplicationReport instance = findInstance(clustername); + if (instance != null) { + log.info("Flexing running cluster"); + SliderClusterProtocol appMaster = connect(instance); + SliderClusterOperations clusterOps = new SliderClusterOperations(appMaster); + clusterOps.flex(instanceDefinition.getResources()); + log.info("application instance size updated"); + exitCode = EXIT_SUCCESS; + } else { + log.info("No running instance to update"); + } + return exitCode; + } + + /** + * Validate an instance definition against a provider. + * @param provider the provider performing the validation + * @param instanceDefinition the instance definition + * @throws SliderException if invalid. + */ + protected void validateInstanceDefinition(AbstractClientProvider provider, + AggregateConf instanceDefinition, SliderFileSystem fs) throws SliderException { + try { + provider.validateInstanceDefinition(instanceDefinition, fs); + } catch (SliderException e) { + //problem, reject it + log.info("Error {} validating application instance definition ", e.getMessage()); + log.debug("Error validating application instance definition ", e); + log.info(instanceDefinition.toString()); + throw e; + } + } + + + /** + * Load the persistent cluster description + * @param clustername name of the cluster + * @return the description in the filesystem + * @throws IOException any problems loading -including a missing file + */ + @VisibleForTesting + public AggregateConf loadPersistedClusterDescription(String clustername) + throws IOException, SliderException, LockAcquireFailedException { + Path clusterDirectory = sliderFileSystem.buildClusterDirPath(clustername); + ConfPersister persister = new ConfPersister(sliderFileSystem, clusterDirectory); + AggregateConf instanceDescription = new AggregateConf(); + persister.load(instanceDescription); + return instanceDescription; + } + + /** + * Connect to a live cluster and get its current state + * @param clustername the cluster name + * @return its description + */ + @VisibleForTesting + public ClusterDescription getClusterDescription(String clustername) throws + YarnException, + IOException { + SliderClusterOperations clusterOperations = + createClusterOperations(clustername); + return clusterOperations.getClusterDescription(); + } + + /** + * Connect to the cluster and get its current state + * @return its description + */ + @VisibleForTesting + public ClusterDescription getClusterDescription() throws + YarnException, + IOException { + return getClusterDescription(getDeployedClusterName()); + } + + /** + * List all node UUIDs in a role + * @param role role name or "" for all + * @return an array of UUID strings + * @throws IOException + * @throws YarnException + */ + @VisibleForTesting + public String[] listNodeUUIDsByRole(String role) throws + IOException, + YarnException { + return createClusterOperations() + .listNodeUUIDsByRole(role); + } + + /** + * List all nodes in a role. This is a double round trip: once to list + * the nodes in a role, another to get their details + * @param role component/role to look for + * @return an array of ContainerNode instances + * @throws IOException + * @throws YarnException + */ + @VisibleForTesting + public List listClusterNodesInRole(String role) throws + IOException, + YarnException { + return createClusterOperations().listClusterNodesInRole(role); + } + + /** + * Get the details on a list of uuids + * @param uuids uuids to ask for + * @return a possibly empty list of node details + * @throws IOException + * @throws YarnException + */ + @VisibleForTesting + public List listClusterNodes(String[] uuids) throws + IOException, + YarnException { + + if (uuids.length == 0) { + // short cut on an empty list + return new LinkedList<>(); + } + return createClusterOperations().listClusterNodes(uuids); + } + + /** + * Get the instance definition from the far end + */ + @VisibleForTesting + public AggregateConf getLiveInstanceDefinition() throws IOException, YarnException { + return createClusterOperations().getInstanceDefinition(); + } + + /** + * Bond to a running cluster + * @param clustername cluster name + * @return the AM RPC client + * @throws SliderException if the cluster is unkown + */ + private SliderClusterProtocol bondToCluster(String clustername) throws + YarnException, + IOException { + verifyBindingsDefined(); + if (clustername == null) { + throw unknownClusterException("(undefined)"); + } + ApplicationReport instance = findInstance(clustername); + if (null == instance) { + throw unknownClusterException(clustername); + } + return connect(instance); + } + + /** + * Create a cluster operations instance against a given cluster + * @param clustername cluster name + * @return a bonded cluster operations instance + * @throws YarnException YARN issues + * @throws IOException IO problems + */ + private SliderClusterOperations createClusterOperations(String clustername) throws + YarnException, + IOException { + SliderClusterProtocol sliderAM = bondToCluster(clustername); + return new SliderClusterOperations(sliderAM); + } + + /** + * Create a cluster operations instance against the active cluster + * -returning any previous created one if held. + * @return a bonded cluster operations instance + * @throws YarnException YARN issues + * @throws IOException IO problems + */ + private SliderClusterOperations createClusterOperations() throws + YarnException, + IOException { + if (sliderClusterOperations == null) { + sliderClusterOperations = + createClusterOperations(getDeployedClusterName()); + } + return sliderClusterOperations; + } + + /** + * Wait for an instance of a named role to be live (or past it in the lifecycle) + * @param role role to look for + * @param timeout time to wait + * @return the state. If still in CREATED, the cluster didn't come up + * in the time period. If LIVE, all is well. If >LIVE, it has shut for a reason + * @throws IOException IO + * @throws SliderException Slider + * @throws WaitTimeoutException if the wait timed out + */ + @VisibleForTesting + public int waitForRoleInstanceLive(String role, long timeout) + throws WaitTimeoutException, IOException, YarnException { + return createClusterOperations().waitForRoleInstanceLive(role, timeout); + } + + /** + * Generate an exception for an unknown cluster + * @param clustername cluster name + * @return an exception with text and a relevant exit code + */ + public UnknownApplicationInstanceException unknownClusterException(String clustername) { + return UnknownApplicationInstanceException.unknownInstance(clustername); + } + + @Override + public String toString() { + return "Slider Client in state " + getServiceState() + + " and Slider Application Instance " + deployedClusterName; + } + + /** + * Get all YARN applications + * @return a possibly empty list + * @throws YarnException + * @throws IOException + */ + @VisibleForTesting + public List getApplications() throws YarnException, IOException { + return yarnClient.getApplications(); + } + + @VisibleForTesting + public ApplicationReport getApplicationReport(ApplicationId appId) + throws YarnException, IOException { + return new LaunchedApplication(appId, yarnClient).getApplicationReport(); + } + + /** + * The configuration used for deployment (after resolution). + * Non-null only after the client has launched the application + * @return the resolved configuration or null + */ + @VisibleForTesting + public AggregateConf getLaunchedInstanceDefinition() { + return launchedInstanceDefinition; + } + + + @Override + public int actionResolve(ActionResolveArgs args) + throws YarnException, IOException { + // as this is an API entry point, validate + // the arguments + args.validate(); + RegistryOperations operations = getRegistryOperations(); + String path = SliderRegistryUtils.resolvePath(args.path); + ServiceRecordMarshal serviceRecordMarshal = new ServiceRecordMarshal(); + try { + if (args.list) { + File destDir = args.destdir; + if (destDir != null) { + destDir.mkdirs(); + } + + Map recordMap; + Map znodes; + try { + znodes = statChildren(registryOperations, path); + recordMap = extractServiceRecords(registryOperations, + path, + znodes.values()); + } catch (PathNotFoundException e) { + // treat the root directory as if if is always there + + if ("/".equals(path)) { + znodes = new HashMap<>(0); + recordMap = new HashMap<>(0); + } else { + throw e; + } + } + // subtract all records from the znodes map to get pure directories + log.info("Entries: {}", znodes.size()); + + for (String name : znodes.keySet()) { + println(" " + name); + } + println(""); + + log.info("Service records: {}", recordMap.size()); + for (Entry recordEntry : recordMap.entrySet()) { + String name = recordEntry.getKey(); + ServiceRecord instance = recordEntry.getValue(); + String json = serviceRecordMarshal.toJson(instance); + if (destDir == null) { + println(name); + println(json); + } else { + String filename = RegistryPathUtils.lastPathEntry(name) + ".json"; + File jsonFile = new File(destDir, filename); + write(jsonFile, + serviceRecordMarshal.toBytes(instance), + true); + } + } + } else { + // resolve single entry + ServiceRecord instance = resolve(path); + File outFile = args.out; + if (args.destdir != null) { + outFile = new File(args.destdir, RegistryPathUtils.lastPathEntry(path)); + } + if (outFile != null) { + write(outFile, serviceRecordMarshal.toBytes(instance), true); + } else { + println(serviceRecordMarshal.toJson(instance)); + } + } + } catch (PathNotFoundException | NoRecordException e) { + // no record at this path + throw new NotFoundException(e, path); + } + return EXIT_SUCCESS; + } + + @Override + public int actionRegistry(ActionRegistryArgs registryArgs) throws + YarnException, + IOException { + // as this is also a test entry point, validate + // the arguments + registryArgs.validate(); + try { + if (registryArgs.list) { + actionRegistryList(registryArgs); + } else if (registryArgs.listConf) { + // list the configurations + actionRegistryListConfigsYarn(registryArgs); + } else if (registryArgs.listExports) { + // list the exports + actionRegistryListExports(registryArgs); + } else if (isSet(registryArgs.getConf)) { + // get a configuration + PublishedConfiguration publishedConfiguration = + actionRegistryGetConfig(registryArgs); + outputConfig(publishedConfiguration, registryArgs); + } else if (isSet(registryArgs.getExport)) { + // get a export group + PublishedExports publishedExports = + actionRegistryGetExport(registryArgs); + outputExport(publishedExports, registryArgs); + } else { + // it's an unknown command + log.info(CommonArgs.usage(serviceArgs, ACTION_DIAGNOSTICS)); + return EXIT_USAGE; + } +// JDK7 + } catch (FileNotFoundException e) { + log.info("{}", e.toString()); + log.debug("{}", e, e); + return EXIT_NOT_FOUND; + } catch (PathNotFoundException e) { + log.info("{}", e.toString()); + log.debug("{}", e, e); + return EXIT_NOT_FOUND; + } + return EXIT_SUCCESS; + } + + /** + * Registry operation + * + * @param registryArgs registry Arguments + * @return the instances (for tests) + * @throws YarnException YARN problems + * @throws IOException Network or other problems + */ + @VisibleForTesting + public Collection actionRegistryList( + ActionRegistryArgs registryArgs) + throws YarnException, IOException { + String serviceType = registryArgs.serviceType; + String name = registryArgs.name; + RegistryOperations operations = getRegistryOperations(); + Collection serviceRecords; + if (StringUtils.isEmpty(name)) { + String path = serviceclassPath(currentUser(), serviceType); + + try { + Map recordMap = + listServiceRecords(operations, path); + if (recordMap.isEmpty()) { + throw new UnknownApplicationInstanceException( + "No applications registered under " + path); + } + serviceRecords = recordMap.values(); + } catch (PathNotFoundException e) { + throw new NotFoundException(path, e); + } + } else { + ServiceRecord instance = lookupServiceRecord(registryArgs); + serviceRecords = new ArrayList<>(1); + serviceRecords.add(instance); + } + + for (ServiceRecord serviceRecord : serviceRecords) { + logInstance(serviceRecord, registryArgs.verbose); + } + return serviceRecords; + } + + @Override + public int actionDiagnostic(ActionDiagnosticArgs diagnosticArgs) { + try { + if (diagnosticArgs.client) { + actionDiagnosticClient(diagnosticArgs); + } else if (diagnosticArgs.application) { + actionDiagnosticApplication(diagnosticArgs); + } else if (diagnosticArgs.yarn) { + actionDiagnosticYarn(diagnosticArgs); + } else if (diagnosticArgs.credentials) { + actionDiagnosticCredentials(); + } else if (diagnosticArgs.all) { + actionDiagnosticAll(diagnosticArgs); + } else if (diagnosticArgs.level) { + actionDiagnosticIntelligent(diagnosticArgs); + } else { + // it's an unknown option + log.info(CommonArgs.usage(serviceArgs, ACTION_DIAGNOSTICS)); + return EXIT_USAGE; + } + } catch (Exception e) { + log.error(e.toString()); + return EXIT_FALSE; + } + return EXIT_SUCCESS; + } + + private void actionDiagnosticIntelligent(ActionDiagnosticArgs diagnosticArgs) + throws YarnException, IOException, URISyntaxException { + // not using member variable clustername because we want to place + // application name after --application option and member variable + // cluster name has to be put behind action + String clusterName = diagnosticArgs.name; + requireArgumentSet(Arguments.ARG_NAME, clusterName); + + try { + validateClientConfigFile(); + log.info("Slider-client.xml is accessible"); + } catch (IOException e) { + // we are catching exceptions here because those are indication of + // validation result, and we need to print them here + log.error("validation of slider-client.xml fails because: " + e, e); + return; + } + SliderClusterOperations clusterOperations = createClusterOperations(clusterName); + // cluster not found exceptions will be thrown upstream + ClusterDescription clusterDescription = clusterOperations + .getClusterDescription(); + log.info("Slider AppMaster is accessible"); + + if (clusterDescription.state == StateValues.STATE_LIVE) { + AggregateConf instanceDefinition = clusterOperations + .getInstanceDefinition(); + String imagePath = instanceDefinition.getInternalOperations().get( + INTERNAL_APPLICATION_IMAGE_PATH); + // if null, that means slider uploaded the agent tarball for the user + // and we need to use where slider has put + if (imagePath == null) { + ApplicationReport appReport = findInstance(clusterName); + Path path1 = sliderFileSystem.getTempPathForCluster(clusterName); + if (appReport != null) { + Path subPath = new Path(path1, appReport.getApplicationId() + .toString() + "/agent"); + imagePath = subPath.toString(); + String pathStr = imagePath + "/" + AGENT_TAR; + try { + validateHDFSFile(sliderFileSystem, pathStr); + log.info("Slider agent package is properly installed at " + pathStr); + } catch (FileNotFoundException e) { + log.error("can not find agent package: {}", pathStr, e); + return; + } catch (IOException e) { + log.error("can not open agent package: {}", pathStr, e); + return; + } + } + } + + String pkgTarballPath = getApplicationDefinitionPath(instanceDefinition + .getAppConfOperations()); + try { + validateHDFSFile(sliderFileSystem, pkgTarballPath); + log.info("Application package is properly installed"); + } catch (FileNotFoundException e) { + log.error("can not find application package: {}", pkgTarballPath, e); + } catch (IOException e) { + log.error("can not open application package: {} ", pkgTarballPath, e); + } + } + } + + private void actionDiagnosticAll(ActionDiagnosticArgs diagnosticArgs) + throws IOException, YarnException { + // assign application name from param to each sub diagnostic function + actionDiagnosticClient(diagnosticArgs); + actionDiagnosticApplication(diagnosticArgs); + actionDiagnosticSlider(diagnosticArgs); + actionDiagnosticYarn(diagnosticArgs); + actionDiagnosticCredentials(); + } + + private void actionDiagnosticCredentials() throws BadConfigException, + IOException { + if (isHadoopClusterSecure(loadSliderClientXML())) { + String credentialCacheFileDescription = null; + try { + credentialCacheFileDescription = checkCredentialCacheFile(); + } catch (BadConfigException e) { + log.error("The credential config is not valid: " + e.toString()); + throw e; + } catch (IOException e) { + log.error("Unable to read the credential file: " + e.toString()); + throw e; + } + log.info("Credential cache file for the current user: " + + credentialCacheFileDescription); + } else { + log.info("the cluster is not in secure mode"); + } + } + + private void actionDiagnosticYarn(ActionDiagnosticArgs diagnosticArgs) + throws IOException, YarnException { + JSONObject converter = null; + log.info("the node in the YARN cluster has below state: "); + List yarnClusterInfo; + try { + yarnClusterInfo = yarnClient.getNodeReports(NodeState.RUNNING); + } catch (YarnException e1) { + log.error("Exception happened when fetching node report from the YARN cluster: " + + e1.toString()); + throw e1; + } catch (IOException e1) { + log.error("Network problem happened when fetching node report YARN cluster: " + + e1.toString()); + throw e1; + } + for (NodeReport nodeReport : yarnClusterInfo) { + log.info(nodeReport.toString()); + } + + if (diagnosticArgs.verbose) { + Writer configWriter = new StringWriter(); + try { + Configuration.dumpConfiguration(yarnClient.getConfig(), configWriter); + } catch (IOException e1) { + log.error("Network problem happened when retrieving YARN config from YARN: " + + e1.toString()); + throw e1; + } + try { + converter = new JSONObject(configWriter.toString()); + log.info("the configuration of the YARN cluster is: " + + converter.toString(2)); + + } catch (JSONException e) { + log.error("JSONException happened during parsing response from YARN: " + + e.toString()); + } + } + } + + private void actionDiagnosticSlider(ActionDiagnosticArgs diagnosticArgs) + throws YarnException, IOException { + // not using member variable clustername because we want to place + // application name after --application option and member variable + // cluster name has to be put behind action + String clusterName = diagnosticArgs.name; + if(isUnset(clusterName)){ + throw new BadCommandArgumentsException("application name must be provided with --name option"); + } + AggregateConf instanceDefinition = fetchInstanceDefinition(clusterName); + String imagePath = instanceDefinition.getInternalOperations().get( + INTERNAL_APPLICATION_IMAGE_PATH); + // if null, it will be uploaded by Slider and thus at slider's path + if (imagePath == null) { + ApplicationReport appReport = findInstance(clusterName); + if (appReport != null) { + Path path1 = sliderFileSystem.getTempPathForCluster(clusterName); + Path subPath = new Path(path1, appReport.getApplicationId().toString() + + "/agent"); + imagePath = subPath.toString(); + } + } + log.info("The path of slider agent tarball on HDFS is: " + imagePath); + } + + private AggregateConf fetchInstanceDefinition(String clusterName) + throws YarnException, IOException { + SliderClusterOperations clusterOperations; + AggregateConf instanceDefinition = null; + try { + clusterOperations = createClusterOperations(clusterName); + instanceDefinition = clusterOperations.getInstanceDefinition(); + } catch (YarnException | IOException e) { + log.error("Failed to retrieve instance definition from YARN: " + + e.toString()); + throw e; + } + return instanceDefinition; + } + + private void actionDiagnosticApplication(ActionDiagnosticArgs diagnosticArgs) + throws YarnException, IOException { + // not using member variable clustername because we want to place + // application name after --application option and member variable + // cluster name has to be put behind action + String clusterName = diagnosticArgs.name; + requireArgumentSet(Arguments.ARG_NAME, clusterName); + AggregateConf instanceDefinition = fetchInstanceDefinition(clusterName); + String clusterDir = instanceDefinition.getAppConfOperations() + .getGlobalOptions().get(AgentKeys.APP_ROOT); + String pkgTarball = getApplicationDefinitionPath(instanceDefinition.getAppConfOperations()); + String runAsUser = instanceDefinition.getAppConfOperations() + .getGlobalOptions().get(AgentKeys.RUNAS_USER); + + log.info("The location of the cluster instance directory in HDFS is: {}", clusterDir); + log.info("The name of the application package tarball on HDFS is: {}",pkgTarball); + log.info("The runas user of the application in the cluster is: {}",runAsUser); + + if (diagnosticArgs.verbose) { + log.info("App config of the application:\n{}", + instanceDefinition.getAppConf().toJson()); + log.info("Resource config of the application:\n{}", + instanceDefinition.getResources().toJson()); + } + } + + private void actionDiagnosticClient(ActionDiagnosticArgs diagnosticArgs) + throws SliderException, IOException { + try { + String currentCommandPath = getCurrentCommandPath(); + SliderVersionInfo.loadAndPrintVersionInfo(log); + String clientConfigPath = getClientConfigPath(); + String jdkInfo = getJDKInfo(); + println("The slider command path: %s", currentCommandPath); + println("The slider-client.xml used by current running command path: %s", + clientConfigPath); + println(jdkInfo); + + // security info + Configuration config = getConfig(); + if (isHadoopClusterSecure(config)) { + println("Hadoop Cluster is secure"); + println("Login user is %s", UserGroupInformation.getLoginUser()); + println("Current user is %s", UserGroupInformation.getCurrentUser()); + + } else { + println("Hadoop Cluster is insecure"); + } + + // verbose? + if (diagnosticArgs.verbose) { + // do the environment + Map env = getSystemEnv(); + Set envList = ConfigHelper.sortedConfigKeys(env.entrySet()); + StringBuilder builder = new StringBuilder("Environment variables:\n"); + for (String key : envList) { + builder.append(key).append("=").append(env.get(key)).append("\n"); + } + println(builder.toString()); + + // Java properties + builder = new StringBuilder("JVM Properties\n"); + Map props = + sortedMap(toMap(System.getProperties())); + for (Entry entry : props.entrySet()) { + builder.append(entry.getKey()).append("=") + .append(entry.getValue()).append("\n"); + } + + println(builder.toString()); + + // then the config + println("Slider client configuration:\n" + ConfigHelper.dumpConfigToString(config)); + } + + validateSliderClientEnvironment(log); + } catch (SliderException | IOException e) { + log.error(e.toString()); + throw e; + } + + } + + /** + * Kerberos Diagnostics + * @param args CLI arguments + * @return exit code + * @throws SliderException + * @throws IOException + */ + @SuppressWarnings("IOResourceOpenedButNotSafelyClosed") + private int actionKDiag(ActionKDiagArgs args) + throws Exception { + PrintWriter out = new PrintWriter(System.err); + boolean closeStream = false; + if (args.out != null) { + out = new PrintWriter(new FileOutputStream(args.out)); + closeStream = true; + } + try { + KerberosDiags kdiags = new KerberosDiags(getConfig(), + out, + args.services, + args.keytab, + args.principal, + args.keylen, + args.secure); + kdiags.execute(); + } catch (KerberosDiags.KerberosDiagsFailure e) { + log.error(e.toString()); + log.debug(e.toString(), e); + throw e; + } catch (Exception e) { + log.error("Kerberos Diagnostics", e); + throw e; + } finally { + if (closeStream) { + out.flush(); + out.close(); + } + } + return 0; + } + + /** + * Log a service record instance + * @param instance record + * @param verbose verbose logging of all external endpoints + */ + private void logInstance(ServiceRecord instance, + boolean verbose) { + if (!verbose) { + log.info("{}", instance.get(YarnRegistryAttributes.YARN_ID, "")); + } else { + log.info("{}: ", instance.get(YarnRegistryAttributes.YARN_ID, "")); + logEndpoints(instance); + } + } + + /** + * Log the external endpoints of a service record + * @param instance service record instance + */ + private void logEndpoints(ServiceRecord instance) { + List endpoints = instance.external; + for (Endpoint endpoint : endpoints) { + log.info(endpoint.toString()); + } + } + + /** + * list configs available for an instance + * + * @param registryArgs registry Arguments + * @throws YarnException YARN problems + * @throws IOException Network or other problems + */ + public void actionRegistryListConfigsYarn(ActionRegistryArgs registryArgs) + throws YarnException, IOException { + + ServiceRecord instance = lookupServiceRecord(registryArgs); + + RegistryRetriever retriever = new RegistryRetriever(getConfig(), instance); + PublishedConfigSet configurations = + retriever.getConfigurations(!registryArgs.internal); + PrintStream out = null; + try { + if (registryArgs.out != null) { + out = new PrintStream(new FileOutputStream(registryArgs.out)); + } else { + out = System.out; + } + for (String configName : configurations.keys()) { + if (!registryArgs.verbose) { + out.println(configName); + } else { + PublishedConfiguration published = + configurations.get(configName); + out.printf("%s: %s\n", + configName, + published.description); + } + } + } finally { + if (registryArgs.out != null && out != null) { + out.flush(); + out.close(); + } + } + } + + /** + * list exports available for an instance + * + * @param registryArgs registry Arguments + * @throws YarnException YARN problems + * @throws IOException Network or other problems + */ + public void actionRegistryListExports(ActionRegistryArgs registryArgs) + throws YarnException, IOException { + ServiceRecord instance = lookupServiceRecord(registryArgs); + + RegistryRetriever retriever = new RegistryRetriever(getConfig(), instance); + PublishedExportsSet exports = + retriever.getExports(!registryArgs.internal); + PrintStream out = null; + boolean streaming = false; + try { + if (registryArgs.out != null) { + out = new PrintStream(new FileOutputStream(registryArgs.out)); + streaming = true; + log.debug("Saving output to {}", registryArgs.out); + } else { + out = System.out; + } + log.debug("Number of exports: {}", exports.keys().size()); + for (String exportName : exports.keys()) { + if (streaming) { + log.debug(exportName); + } + if (!registryArgs.verbose) { + out.println(exportName); + } else { + PublishedExports published = exports.get(exportName); + out.printf("%s: %s\n", + exportName, + published.description); + } + } + } finally { + if (streaming) { + out.flush(); + out.close(); + } + } + } + + /** + * list configs available for an instance + * + * @param registryArgs registry Arguments + * @throws YarnException YARN problems + * @throws IOException Network or other problems + * @throws FileNotFoundException if the config is not found + */ + @VisibleForTesting + public PublishedConfiguration actionRegistryGetConfig(ActionRegistryArgs registryArgs) + throws YarnException, IOException { + return ClientUtils.getConfigFromRegistry(getRegistryOperations(), + getConfig(), registryArgs.getConf, registryArgs.name, registryArgs.user, + !registryArgs.internal); + } + + /** + * get a specific export group + * + * @param registryArgs registry Arguments + * + * @throws YarnException YARN problems + * @throws IOException Network or other problems + * @throws FileNotFoundException if the config is not found + */ + @VisibleForTesting + public PublishedExports actionRegistryGetExport(ActionRegistryArgs registryArgs) + throws YarnException, IOException { + ServiceRecord instance = lookupServiceRecord(registryArgs); + + RegistryRetriever retriever = new RegistryRetriever(getConfig(), instance); + boolean external = !registryArgs.internal; + PublishedExportsSet exports = retriever.getExports(external); + + PublishedExports published = retriever.retrieveExports(exports, + registryArgs.getExport, + external); + return published; + } + + /** + * write out the config. If a destination is provided and that dir is a + * directory, the entry is written to it with the name provided + extension, + * else it is printed to standard out. + * @param published published config + * @param registryArgs registry Arguments + * @throws BadCommandArgumentsException + * @throws IOException + */ + private void outputConfig(PublishedConfiguration published, + ActionRegistryArgs registryArgs) throws + BadCommandArgumentsException, + IOException { + // decide whether or not to print + String entry = registryArgs.getConf; + String format = registryArgs.format; + String output = ClientUtils.saveOrReturnConfig(published, + registryArgs.format, registryArgs.out, entry + "." + format); + if (output != null) { + print(output); + } + } + + /** + * write out the config + * @param published + * @param registryArgs + * @throws BadCommandArgumentsException + * @throws IOException + */ + private void outputExport(PublishedExports published, + ActionRegistryArgs registryArgs) throws + BadCommandArgumentsException, + IOException { + // decide whether or not to print + String entry = registryArgs.getExport; + String format = ConfigFormat.JSON.toString(); + ConfigFormat configFormat = ConfigFormat.resolve(format); + if (configFormat == null || configFormat != ConfigFormat.JSON) { + throw new BadCommandArgumentsException( + "Unknown/Unsupported format %s . Only JSON is supported.", format); + } + + PublishedExportsOutputter outputter = + PublishedExportsOutputter.createOutputter(configFormat, + published); + boolean print = registryArgs.out == null; + if (!print) { + File destFile; + destFile = registryArgs.out; + if (destFile.isDirectory()) { + // creating it under a directory + destFile = new File(destFile, entry + "." + format); + } + log.info("Destination path: {}", destFile); + outputter.save(destFile); + } else { + print(outputter.asString()); + } + } + + /** + * Look up an instance + * @return instance data + * @throws SliderException other failures + * @throws IOException IO problems or wrapped exceptions + */ + private ServiceRecord lookupServiceRecord(ActionRegistryArgs registryArgs) throws + SliderException, + IOException { + return ClientUtils.lookupServiceRecord(getRegistryOperations(), + registryArgs.user, registryArgs.serviceType, registryArgs.name); + } + + /** + * + * Look up an instance + * @param path path + * @return instance data + * @throws NotFoundException no path/no service record + * at the end of the path + * @throws SliderException other failures + * @throws IOException IO problems or wrapped exceptions + */ + public ServiceRecord resolve(String path) + throws IOException, SliderException { + return ClientUtils.resolve(getRegistryOperations(), path); + } + + /** + * List instances in the registry for the current user + * @return a list of slider registry instances + * @throws IOException Any IO problem ... including no path in the registry + * to slider service classes for this user + * @throws SliderException other failures + */ + + public Map listRegistryInstances() + throws IOException, SliderException { + Map recordMap = listServiceRecords( + getRegistryOperations(), + serviceclassPath(currentUser(), SliderKeys.APP_TYPE)); + return recordMap; + } + + /** + * List instances in the registry + * @return the instance IDs + * @throws IOException + * @throws YarnException + */ + public List listRegisteredSliderInstances() throws + IOException, + YarnException { + try { + Map recordMap = listServiceRecords( + getRegistryOperations(), + serviceclassPath(currentUser(), SliderKeys.APP_TYPE)); + return new ArrayList<>(recordMap.keySet()); + } catch (PathNotFoundException e) { + log.debug("No registry path for slider instances for current user: {}", e, e); + // no entries: return an empty list + return new ArrayList<>(0); + } catch (IOException | YarnException e) { + throw e; + } catch (Exception e) { + throw new IOException(e); + } + } + + /** + * Start the registry if it is not there yet + * @return the registry service + * @throws SliderException + * @throws IOException + */ + private synchronized RegistryOperations maybeStartYarnRegistry() + throws SliderException, IOException { + + if (registryOperations == null) { + registryOperations = startRegistryOperationsService(); + } + return registryOperations; + } + + @Override + public RegistryOperations getRegistryOperations() + throws SliderException, IOException { + return maybeStartYarnRegistry(); + } + + /** + * Output to standard out/stderr (implementation specific detail) + * @param src source + */ + @SuppressWarnings("UseOfSystemOutOrSystemErr") + private static void print(CharSequence src) { + clientOutputStream.append(src); + } + + /** + * Output to standard out/stderr with a newline after + * @param message message + */ + private static void println(String message) { + print(message); + print("\n"); + } + /** + * Output to standard out/stderr with a newline after, formatted + * @param message message + * @param args arguments for string formatting + */ + private static void println(String message, Object ... args) { + print(String.format(message, args)); + print("\n"); + } + + /** + * Implement the lookup action. + * @param args Action arguments + * @return 0 if the entry was found + * @throws IOException + * @throws YarnException + * @throws UnknownApplicationInstanceException if a specific instance + * was named but it was not found + */ + @VisibleForTesting + public int actionLookup(ActionLookupArgs args) + throws IOException, YarnException { + verifyBindingsDefined(); + try { + ApplicationId id = ConverterUtils.toApplicationId(args.id); + ApplicationReport report = yarnClient.getApplicationReport(id); + SerializedApplicationReport sar = new SerializedApplicationReport(report); + ApplicationReportSerDeser serDeser = new ApplicationReportSerDeser(); + if (args.outputFile != null) { + serDeser.save(sar, args.outputFile); + } else { + println(serDeser.toJson(sar)); + } + } catch (IllegalArgumentException e) { + throw new BadCommandArgumentsException(e, "%s : %s", args, e); + } catch (ApplicationAttemptNotFoundException | ApplicationNotFoundException notFound) { + throw new NotFoundException(notFound, notFound.toString()); + } + return EXIT_SUCCESS; + } + + @Override + public int actionDependency(ActionDependencyArgs args) throws IOException, + YarnException { + String currentUser = getUsername(); + log.info("Running command as user {}", currentUser); + + String version = getSliderVersion(); + Path dependencyLibTarGzip = sliderFileSystem.getDependencyTarGzip(); + + // Check if dependency has already been uploaded, in which case log + // appropriately and exit success (unless overwrite has been requested) + if (sliderFileSystem.isFile(dependencyLibTarGzip) && !args.overwrite) { + println(String.format( + "Dependency libs are already uploaded to %s. Use %s " + + "if you want to re-upload", dependencyLibTarGzip.toUri(), + Arguments.ARG_OVERWRITE)); + return EXIT_SUCCESS; + } + + String libDir = System.getProperty(SliderKeys.PROPERTY_LIB_DIR); + if (isSet(libDir)) { + File srcFolder = new File(libDir); + File tempLibTarGzipFile = File.createTempFile( + SliderKeys.SLIDER_DEPENDENCY_TAR_GZ_FILE_NAME + "_", + SliderKeys.SLIDER_DEPENDENCY_TAR_GZ_FILE_EXT); + // copy all jars except slider-core-.jar + tarGzipFolder(srcFolder, tempLibTarGzipFile, createJarFilter()); + + log.info("Uploading dependency for AM (version {}) from {} to {}", + version, tempLibTarGzipFile.toURI(), dependencyLibTarGzip.toUri()); + sliderFileSystem.copyLocalFileToHdfs(tempLibTarGzipFile, + dependencyLibTarGzip, new FsPermission( + SliderKeys.SLIDER_DEPENDENCY_DIR_PERMISSIONS)); + return EXIT_SUCCESS; + } else { + return EXIT_FALSE; + } + } + + private int actionHelp(String actionName) throws YarnException, IOException { + throw new UsageException(CommonArgs.usage(serviceArgs, actionName)); + } + + private int actionHelp(String errMsg, String actionName) + throws YarnException, IOException { + throw new UsageException("%s %s", errMsg, CommonArgs.usage(serviceArgs, + actionName)); + } + + /** + * List the nodes in the cluster, possibly filtering by node state or label. + * + * @param args argument list + * @return a possibly empty list of nodes in the cluster + * @throws IOException IO problems + * @throws YarnException YARN problems + */ + @Override + public NodeInformationList listYarnClusterNodes(ActionNodesArgs args) + throws YarnException, IOException { + return yarnClient.listNodes(args.label, args.healthy); + } + + /** + * List the nodes in the cluster, possibly filtering by node state or label. + * + * @param args argument list + * @return a possibly empty list of nodes in the cluster + * @throws IOException IO problems + * @throws YarnException YARN problems + */ + public NodeInformationList listInstanceNodes(String instance, ActionNodesArgs args) + throws YarnException, IOException { + // TODO + log.info("listInstanceNodes {}", instance); + SliderClusterOperations clusterOps = + new SliderClusterOperations(bondToCluster(instance)); + return clusterOps.getLiveNodes(); + } + + /** + * List the nodes in the cluster, possibly filtering by node state or label. + * Prints them to stdout unless the args names a file instead. + * @param args argument list + * @throws IOException IO problems + * @throws YarnException YARN problems + */ + public int actionNodes(String instance, ActionNodesArgs args) throws YarnException, IOException { + + args.instance = instance; + NodeInformationList nodes; + if (SliderUtils.isUnset(instance)) { + nodes = listYarnClusterNodes(args); + } else { + nodes = listInstanceNodes(instance, args); + } + log.debug("Node listing for {} has {} nodes", args, nodes.size()); + JsonSerDeser serDeser = NodeInformationList.createSerializer(); + if (args.outputFile != null) { + serDeser.save(nodes, args.outputFile); + } else { + println(serDeser.toJson(nodes)); + } + return 0; + } + + /** + * Create a new IPC client for talking to slider via what follows the REST API. + * Client must already be bonded to the cluster + * @return a new IPC client + */ + public SliderApplicationApi createIpcClient() + throws IOException, YarnException { + return new SliderApplicationIpcClient(createClusterOperations()); + } + + /** + * Save/list tokens. This is for testing oozie integration + * @param args commands + * @return status + */ + private int actionTokens(ActionTokensArgs args) + throws IOException, YarnException { + return new TokensOperation().actionTokens(args, + sliderFileSystem.getFileSystem(), + getConfig(), + yarnClient); + } + +} + + diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderClientAPI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderClientAPI.java new file mode 100644 index 00000000000..30f6ba9f592 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderClientAPI.java @@ -0,0 +1,368 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client; + +import org.apache.hadoop.registry.client.api.RegistryOperations; +import org.apache.hadoop.service.Service; +import org.apache.hadoop.yarn.api.records.ApplicationReport; +import org.apache.hadoop.yarn.api.records.YarnApplicationState; +import org.apache.hadoop.yarn.exceptions.YarnException; +import org.apache.slider.api.types.NodeInformationList; +import org.apache.slider.api.types.SliderInstanceDescription; +import org.apache.slider.common.params.AbstractClusterBuildingActionArgs; +import org.apache.slider.common.params.ActionAMSuicideArgs; +import org.apache.slider.common.params.ActionClientArgs; +import org.apache.slider.common.params.ActionDependencyArgs; +import org.apache.slider.common.params.ActionDestroyArgs; +import org.apache.slider.common.params.ActionDiagnosticArgs; +import org.apache.slider.common.params.ActionEchoArgs; +import org.apache.slider.common.params.ActionFlexArgs; +import org.apache.slider.common.params.ActionFreezeArgs; +import org.apache.slider.common.params.ActionInstallKeytabArgs; +import org.apache.slider.common.params.ActionInstallPackageArgs; +import org.apache.slider.common.params.ActionKeytabArgs; +import org.apache.slider.common.params.ActionNodesArgs; +import org.apache.slider.common.params.ActionPackageArgs; +import org.apache.slider.common.params.ActionKillContainerArgs; +import org.apache.slider.common.params.ActionListArgs; +import org.apache.slider.common.params.ActionRegistryArgs; +import org.apache.slider.common.params.ActionResolveArgs; +import org.apache.slider.common.params.ActionResourceArgs; +import org.apache.slider.common.params.ActionStatusArgs; +import org.apache.slider.common.params.ActionThawArgs; +import org.apache.slider.common.params.ActionUpgradeArgs; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.SliderException; +import org.apache.slider.providers.AbstractClientProvider; + +import java.io.IOException; +import java.util.Map; + +/** + * Interface of those method calls in the slider API that are intended + * for direct public invocation. + *

+ * Stability: evolving + */ +public interface SliderClientAPI extends Service { + /** + * Destroy a cluster. There's two race conditions here + * #1 the cluster is started between verifying that there are no live + * clusters of that name. + */ + int actionDestroy(String clustername, ActionDestroyArgs destroyArgs) + throws YarnException, IOException; + + int actionDestroy(String clustername) throws YarnException, + IOException; + + /** + * AM to commit an asynchronous suicide + */ + int actionAmSuicide(String clustername, + ActionAMSuicideArgs args) throws YarnException, IOException; + + /** + * Get the provider for this cluster + * @param provider the name of the provider + * @return the provider instance + * @throws SliderException problems building the provider + */ + AbstractClientProvider createClientProvider(String provider) + throws SliderException; + + /** + * Build up the cluster specification/directory + * + * @param clustername cluster name + * @param buildInfo the arguments needed to build the cluster + * @throws YarnException Yarn problems + * @throws IOException other problems + * @throws BadCommandArgumentsException bad arguments. + */ + int actionBuild(String clustername, + AbstractClusterBuildingActionArgs buildInfo) throws YarnException, IOException; + + /** + * Upload keytab to a designated sub-directory of the user home directory + * + * @param installKeytabInfo the arguments needed to upload the keytab + * @throws YarnException Yarn problems + * @throws IOException other problems + * @throws BadCommandArgumentsException bad arguments. + * @deprecated use #actionKeytab + */ + int actionInstallKeytab(ActionInstallKeytabArgs installKeytabInfo) + throws YarnException, IOException; + + /** + * Manage keytabs leveraged by slider + * + * @param keytabInfo the arguments needed to manage the keytab + * @throws YarnException Yarn problems + * @throws IOException other problems + * @throws BadCommandArgumentsException bad arguments. + */ + int actionKeytab(ActionKeytabArgs keytabInfo) + throws YarnException, IOException; + + /** + * Upload application package to user home directory + * + * @param installPkgInfo the arguments needed to upload the package + * @throws YarnException Yarn problems + * @throws IOException other problems + * @throws BadCommandArgumentsException bad arguments. + */ + int actionInstallPkg(ActionInstallPackageArgs installPkgInfo) + throws YarnException, IOException; + + /** + * Manage file resources leveraged by slider + * + * @param resourceInfo the arguments needed to manage the resource + * @throws YarnException Yarn problems + * @throws IOException other problems + * @throws BadCommandArgumentsException bad arguments. + */ + int actionResource(ActionResourceArgs resourceInfo) + throws YarnException, IOException; + + /** + * Perform client operations such as install or configure + * + * @param clientInfo the arguments needed for client operations + * + * @throws SliderException bad arguments. + * @throws IOException problems related to package and destination folders + */ + int actionClient(ActionClientArgs clientInfo) + throws IOException, YarnException; + + /** + * Managing slider application package + * + * @param pkgInfo the arguments needed to upload, delete or list the package + * @throws YarnException Yarn problems + * @throws IOException other problems + * @throws BadCommandArgumentsException bad arguments. + */ + int actionPackage(ActionPackageArgs pkgInfo) + throws YarnException, IOException; + + /** + * Update the cluster specification + * + * @param clustername cluster name + * @param buildInfo the arguments needed to update the cluster + * @throws YarnException Yarn problems + * @throws IOException other problems + */ + int actionUpdate(String clustername, + AbstractClusterBuildingActionArgs buildInfo) + throws YarnException, IOException; + + /** + * Upgrade the cluster with a newer version of the application + * + * @param clustername cluster name + * @param buildInfo the arguments needed to upgrade the cluster + * @throws YarnException Yarn problems + * @throws IOException other problems + */ + int actionUpgrade(String clustername, + ActionUpgradeArgs buildInfo) + throws YarnException, IOException; + + /** + * Get the report of a this application + * @return the app report or null if it could not be found. + * @throws IOException + * @throws YarnException + */ + ApplicationReport getApplicationReport() + throws IOException, YarnException; + + /** + * Kill the submitted application via YARN + * @throws YarnException + * @throws IOException + */ + boolean forceKillApplication(String reason) + throws YarnException, IOException; + + /** + * Implement the list action: list all nodes + * @return exit code of 0 if a list was created + */ + int actionList(String clustername, ActionListArgs args) throws IOException, YarnException; + + /** + * Enumerate slider instances for the current user, and the + * most recent app report, where available. + * @param listOnlyInState boolean to indicate that the instances should + * only include those in a YARN state + * minAppState <= currentState <= maxAppState + * + * @param minAppState minimum application state to include in enumeration. + * @param maxAppState maximum application state to include + * @return a map of application instance name to description + * @throws IOException Any IO problem + * @throws YarnException YARN problems + */ + Map enumSliderInstances( + boolean listOnlyInState, + YarnApplicationState minAppState, + YarnApplicationState maxAppState) + throws IOException, YarnException; + + /** + * Implement the islive action: probe for a cluster of the given name existing + * @return exit code + */ + int actionFlex(String name, ActionFlexArgs args) throws YarnException, IOException; + + /** + * Test for a cluster existing probe for a cluster of the given name existing + * in the filesystem. If the live param is set, it must be a live cluster + * @return exit code + */ + int actionExists(String name, boolean checkLive) throws YarnException, IOException; + + /** + * Kill a specific container of the cluster + * @param name cluster name + * @param args arguments + * @return exit code + * @throws YarnException + * @throws IOException + */ + int actionKillContainer(String name, ActionKillContainerArgs args) + throws YarnException, IOException; + + /** + * Echo operation (not currently wired up to command line) + * @param name cluster name + * @param args arguments + * @return the echoed text + * @throws YarnException + * @throws IOException + */ + String actionEcho(String name, ActionEchoArgs args) + throws YarnException, IOException; + + /** + * Status operation + * + * @param clustername cluster name + * @param statusArgs status arguments + * @return 0 -for success, else an exception is thrown + * @throws YarnException + * @throws IOException + */ + int actionStatus(String clustername, ActionStatusArgs statusArgs) + throws YarnException, IOException; + + /** + * Version Details + * @return exit code + */ + int actionVersion(); + + /** + * Stop the cluster + * + * @param clustername cluster name + * @param freezeArgs arguments to the stop + * @return EXIT_SUCCESS if the cluster was not running by the end of the operation + */ + int actionFreeze(String clustername, ActionFreezeArgs freezeArgs) + throws YarnException, IOException; + + /** + * Restore a cluster + */ + int actionThaw(String clustername, ActionThawArgs thaw) throws YarnException, IOException; + + /** + * Registry operation + * + * @param args registry Arguments + * @return 0 for success, -1 for some issues that aren't errors, just failures + * to retrieve information (e.g. no configurations for that entry) + * @throws YarnException YARN problems + * @throws IOException Network or other problems + */ + int actionResolve(ActionResolveArgs args) + throws YarnException, IOException; + + /** + * Registry operation + * + * @param registryArgs registry Arguments + * @return 0 for success, -1 for some issues that aren't errors, just failures + * to retrieve information (e.g. no configurations for that entry) + * @throws YarnException YARN problems + * @throws IOException Network or other problems + */ + int actionRegistry(ActionRegistryArgs registryArgs) + throws YarnException, IOException; + + /** + * diagnostic operation + * + * @param diagnosticArgs diagnostic Arguments + * @return 0 for success, -1 for some issues that aren't errors, just + * failures to retrieve information (e.g. no application name + * specified) + * @throws YarnException YARN problems + * @throws IOException Network or other problems + */ + int actionDiagnostic(ActionDiagnosticArgs diagnosticArgs); + + /** + * Get the registry binding. As this may start the registry, it can take time + * and fail + * @return the registry + */ + RegistryOperations getRegistryOperations() + throws SliderException, IOException; + + /** + * Upload all Slider AM and agent dependency libraries to HDFS, so that they + * do not need to be uploaded with every create call. This operation is + * Slider version specific. So it needs to be invoked for every single + * version of slider/slider-client. + * + * @throws SliderException + * @throws IOException + */ + int actionDependency(ActionDependencyArgs dependencyArgs) throws IOException, + YarnException; + + /** + * List the nodes + * @param args + * @return + * @throws YarnException + * @throws IOException + */ + NodeInformationList listYarnClusterNodes(ActionNodesArgs args) + throws YarnException, IOException; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java new file mode 100644 index 00000000000..d471cdb27cd --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/SliderYarnClientImpl.java @@ -0,0 +1,410 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client; + +import com.google.common.base.Preconditions; +import org.apache.commons.lang.StringUtils; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.security.UserGroupInformation; +import org.apache.hadoop.yarn.api.ApplicationClientProtocol; +import org.apache.hadoop.yarn.api.protocolrecords.KillApplicationRequest; +import org.apache.hadoop.yarn.api.protocolrecords.KillApplicationResponse; +import org.apache.hadoop.yarn.api.records.ApplicationId; +import org.apache.hadoop.yarn.api.records.ApplicationReport; +import org.apache.hadoop.yarn.api.records.NodeReport; +import org.apache.hadoop.yarn.api.records.NodeState; +import org.apache.hadoop.yarn.api.records.YarnApplicationState; +import org.apache.hadoop.yarn.client.api.impl.YarnClientImpl; +import org.apache.hadoop.yarn.conf.YarnConfiguration; +import org.apache.hadoop.yarn.exceptions.YarnException; +import org.apache.hadoop.yarn.util.ConverterUtils; +import org.apache.hadoop.yarn.util.Records; +import org.apache.slider.api.types.NodeInformation; +import org.apache.slider.api.types.NodeInformationList; +import org.apache.slider.common.SliderKeys; +import org.apache.slider.common.params.ActionNodesArgs; +import org.apache.slider.common.tools.CoreFileSystem; +import org.apache.slider.common.tools.Duration; +import org.apache.slider.common.tools.SliderFileSystem; +import org.apache.slider.common.tools.SliderUtils; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.net.BindException; +import java.net.InetSocketAddress; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * A class that extends visibility to some of the YarnClientImpl + * members and data structures, and factors out pure-YARN operations + * from the slider entry point service + */ +public class SliderYarnClientImpl extends YarnClientImpl { + protected static final Logger log = LoggerFactory.getLogger(SliderYarnClientImpl.class); + + /** + * Keyword to use in the {@link #emergencyForceKill(String)} + * operation to force kill all application instances belonging + * to a specific user + */ + public static final String KILL_ALL = "all"; + + @Override + protected void serviceInit(Configuration conf) throws Exception { + InetSocketAddress clientRpcAddress = SliderUtils.getRmAddress(conf); + if (!SliderUtils.isAddressDefined(clientRpcAddress)) { + // address isn't known; fail fast + throw new BindException("Invalid " + YarnConfiguration.RM_ADDRESS + + " value:" + conf.get(YarnConfiguration.RM_ADDRESS) + + " - see https://wiki.apache.org/hadoop/UnsetHostnameOrPort"); + } + super.serviceInit(conf); + } + + /** + * Get the RM Client RPC interface + * @return an RPC interface valid after initialization and authentication + */ + public ApplicationClientProtocol getRmClient() { + return rmClient; + } + + /** + * List Slider runninginstances belonging to a specific user. + * @deprecated use {@link #listDeployedInstances(String)} + * @param user user: "" means all users + * @return a possibly empty list of Slider AMs + */ + public List listInstances(String user) + throws YarnException, IOException { + return listDeployedInstances(user); + } + + /** + * List Slider deployedinstances belonging to a specific user. + *

+ * Deployed means: known about in the YARN cluster; it will include + * any that are in the failed/finished state, as well as those queued + * for starting. + * @param user user: "" means all users + * @return a possibly empty list of Slider AMs + */ + public List listDeployedInstances(String user) + throws YarnException, IOException { + Preconditions.checkArgument(user != null, "Null User"); + Set types = new HashSet<>(1); + types.add(SliderKeys.APP_TYPE); + List allApps = getApplications(types); + List results = new ArrayList<>(); + for (ApplicationReport report : allApps) { + if (StringUtils.isEmpty(user) || user.equals(report.getUser())) { + results.add(report); + } + } + return results; + } + + /** + * find all instances of a specific app -if there is more than one in the + * YARN cluster, + * this returns them all + * @param user user; use "" for all users + * @param appname application name + * @return the list of all matching application instances + */ + public List findAllInstances(String user, + String appname) + throws IOException, YarnException { + Preconditions.checkArgument(appname != null, "Null application name"); + + List instances = listDeployedInstances(user); + List results = + new ArrayList<>(instances.size()); + for (ApplicationReport report : instances) { + if (report.getName().equals(appname)) { + results.add(report); + } + } + return results; + } + + /** + * Helper method to determine if a cluster application is running -or + * is earlier in the lifecycle + * @param app application report + * @return true if the application is considered live + */ + public boolean isApplicationLive(ApplicationReport app) { + Preconditions.checkArgument(app != null, "Null app report"); + + return app.getYarnApplicationState().ordinal() <= YarnApplicationState.RUNNING.ordinal(); + } + + + /** + * Kill a running application + * @param applicationId app Id + * @param reason reason: reason for log + * @return the response + * @throws YarnException YARN problems + * @throws IOException IO problems + */ + public KillApplicationResponse killRunningApplication(ApplicationId applicationId, + String reason) + throws YarnException, IOException { + Preconditions.checkArgument(applicationId != null, "Null application Id"); + log.info("Killing application {} - {}", applicationId.getClusterTimestamp(), + reason); + KillApplicationRequest request = + Records.newRecord(KillApplicationRequest.class); + request.setApplicationId(applicationId); + return getRmClient().forceKillApplication(request); + } + + private String getUsername() throws IOException { + return UserGroupInformation.getCurrentUser().getShortUserName(); + } + + /** + * Force kill a yarn application by ID. No niceties here + * @param applicationId app Id. "all" means "kill all instances of the current user + * + */ + public void emergencyForceKill(String applicationId) + throws YarnException, IOException { + + Preconditions.checkArgument(StringUtils.isNotEmpty(applicationId), + "Null/empty application Id"); + + if (KILL_ALL.equals(applicationId)) { + // user wants all instances killed + String user = getUsername(); + log.info("Killing all applications belonging to {}", user); + Collection instances = listDeployedInstances(user); + for (ApplicationReport instance : instances) { + if (isApplicationLive(instance)) { + ApplicationId appId = instance.getApplicationId(); + log.info("Killing Application {}", appId); + + killRunningApplication(appId, "forced kill"); + } + } + } else { + ApplicationId appId = ConverterUtils.toApplicationId(applicationId); + + log.info("Killing Application {}", applicationId); + + killRunningApplication(appId, "forced kill"); + } + } + + /** + * Monitor the submitted application for reaching the requested state. + * Will also report if the app reaches a later state (failed, killed, etc) + * Kill application if duration!= null & time expires. + * @param appId Application Id of application to be monitored + * @param duration how long to wait -must be more than 0 + * @param desiredState desired state. + * @return the application report -null on a timeout + * @throws YarnException + * @throws IOException + */ + public ApplicationReport monitorAppToState( + ApplicationId appId, YarnApplicationState desiredState, Duration duration) + throws YarnException, IOException { + + if (appId == null) { + throw new BadCommandArgumentsException("null application ID"); + } + if (duration.limit <= 0) { + throw new BadCommandArgumentsException("Invalid monitoring duration"); + } + log.debug("Waiting {} millis for app to reach state {} ", + duration.limit, + desiredState); + duration.start(); + try { + while (true) { + // Get application report for the appId we are interested in + + ApplicationReport r = getApplicationReport(appId); + + log.debug("queried status is\n{}", + new SliderUtils.OnDemandReportStringifier(r)); + + YarnApplicationState state = r.getYarnApplicationState(); + if (state.ordinal() >= desiredState.ordinal()) { + log.debug("App in desired state (or higher) :{}", state); + return r; + } + if (duration.getLimitExceeded()) { + log.debug( + "Wait limit of {} millis to get to state {}, exceeded; app status\n {}", + duration.limit, + desiredState, + new SliderUtils.OnDemandReportStringifier(r)); + return null; + } + + // sleep 1s. + try { + Thread.sleep(1000); + } catch (InterruptedException ignored) { + log.debug("Thread sleep in monitoring loop interrupted"); + } + } + } finally { + duration.close(); + } + } + + /** + * find all live instances of a specific app -if there is >1 in the cluster, + * this returns them all. State should be running or less + * @param user user + * @param appname application name + * @return the list of all matching application instances + */ + public List findAllLiveInstances(String user, + String appname) throws + YarnException, + IOException { + Preconditions.checkArgument(StringUtils.isNotEmpty(appname), + "Null/empty application name"); + List instances = listDeployedInstances(user); + List results = + new ArrayList(instances.size()); + for (ApplicationReport app : instances) { + if (app.getName().equals(appname) + && isApplicationLive(app)) { + results.add(app); + } + } + return results; + } + + /** + * Find a cluster in the instance list; biased towards live instances + * @param instances list of instances + * @param appname application name + * @return the first found instance, else a failed/finished instance, or null + * if there are none of those + */ + public ApplicationReport findClusterInInstanceList(List instances, + String appname) { + Preconditions.checkArgument(instances != null, "Null instances list"); + Preconditions.checkArgument(StringUtils.isNotEmpty(appname), + "Null/empty application name"); + // sort by most recent + SliderUtils.sortApplicationsByMostRecent(instances); + ApplicationReport found = null; + for (ApplicationReport app : instances) { + if (app.getName().equals(appname)) { + if (isApplicationLive(app)) { + return app; + } + // set the found value if not set + found = found != null ? found : app; + } + } + return found; + } + + /** + * Find an app in the instance list in the desired state + * @param instances instance list + * @param appname application name + * @param desiredState yarn state desired + * @return the match or null for none + */ + public ApplicationReport findAppInInstanceList(List instances, + String appname, + YarnApplicationState desiredState) { + Preconditions.checkArgument(instances != null, "Null instances list"); + Preconditions.checkArgument(StringUtils.isNotEmpty(appname), + "Null/empty application name"); + Preconditions.checkArgument(desiredState != null, "Null desiredState"); + log.debug("Searching {} records for instance name {} in state '{}'", + instances.size(), appname, desiredState); + for (ApplicationReport app : instances) { + if (app.getName().equals(appname)) { + + YarnApplicationState appstate = + app.getYarnApplicationState(); + log.debug("app ID {} is in state {}", app.getApplicationId(), appstate); + if (appstate.equals(desiredState)) { + log.debug("match"); + return app; + } + } + } + // nothing found in desired state + log.debug("No match"); + return null; + } + + /** + * List the nodes in the cluster, possibly filtering by node state or label. + * + * @param label label to filter by -or "" for any + * @param live flag to request running nodes only + * @return a possibly empty list of nodes in the cluster + * @throws IOException IO problems + * @throws YarnException YARN problems + */ + public NodeInformationList listNodes(String label, boolean live) + throws IOException, YarnException { + Preconditions.checkArgument(label != null, "null label"); + NodeState[] states; + if (live) { + states = new NodeState[1]; + states[0] = NodeState.RUNNING; + } else { + states = new NodeState[0]; + } + List reports = getNodeReports(states); + NodeInformationList results = new NodeInformationList(reports.size()); + for (NodeReport report : reports) { + if (live && report.getNodeState() != NodeState.RUNNING) { + continue; + } + if (!label.isEmpty() && !report.getNodeLabels().contains(label)) { + continue; + } + // build node info from report + NodeInformation info = new NodeInformation(); + info.hostname = report.getNodeId().getHost(); + info.healthReport = report.getHealthReport(); + info.httpAddress = report.getHttpAddress(); + info.labels = SliderUtils.extractNodeLabel(report); + info.rackName = report.getRackName(); + info.state = report.getNodeState().toString(); + results.add(info); + } + return results; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/TokensOperation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/TokensOperation.java new file mode 100644 index 00000000000..9b9c141e901 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/TokensOperation.java @@ -0,0 +1,109 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.security.Credentials; +import org.apache.hadoop.security.UserGroupInformation; +import org.apache.hadoop.yarn.client.api.impl.YarnClientImpl; +import org.apache.hadoop.yarn.exceptions.YarnException; +import org.apache.slider.common.params.ActionTokensArgs; +import org.apache.slider.core.exceptions.BadClusterStateException; +import org.apache.slider.core.exceptions.NotFoundException; +import static org.apache.slider.core.launch.CredentialUtils.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; + +public class TokensOperation { + + private static final Logger log = LoggerFactory.getLogger(TokensOperation.class); + public static final String E_INSECURE + = "Cluster is not secure -tokens cannot be acquired"; + public static final String E_MISSING_SOURCE_FILE = "Missing source file: "; + public static final String E_NO_KEYTAB = "No keytab: "; + + public int actionTokens(ActionTokensArgs args, FileSystem fs, + Configuration conf, + YarnClientImpl yarnClient) + throws IOException, YarnException { + Credentials credentials; + String footnote = ""; + UserGroupInformation user = UserGroupInformation.getCurrentUser(); + boolean isSecure = UserGroupInformation.isSecurityEnabled(); + if (args.keytab != null) { + File keytab = args.keytab; + if (!keytab.isFile()) { + throw new NotFoundException(E_NO_KEYTAB + keytab.getAbsolutePath()); + } + String principal = args.principal; + log.info("Logging in as {} from keytab {}", principal, keytab); + user = UserGroupInformation.loginUserFromKeytabAndReturnUGI( + principal, keytab.getCanonicalPath()); + } + Credentials userCredentials = user.getCredentials(); + File output = args.output; + if (output != null) { + if (!isSecure) { + throw new BadClusterStateException(E_INSECURE); + } + credentials = new Credentials(userCredentials); + // filesystem + addRMRenewableFSDelegationTokens(conf, fs, credentials); + addRMDelegationToken(yarnClient, credentials); + if (maybeAddTimelineToken(conf, credentials) != null) { + log.debug("Added timeline token"); + } + saveTokens(output, credentials); + String filename = output.getCanonicalPath(); + footnote = String.format("%d tokens saved to %s\n" + + "To use these in the environment:\n" + + "export %s=%s", + credentials.numberOfTokens(), + filename, UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION, filename); + } else if (args.source != null) { + File source = args.source; + log.info("Reading credentials from file {}", source); + if (!source.isFile()) { + throw new NotFoundException( E_MISSING_SOURCE_FILE + source.getAbsolutePath()); + } + credentials = Credentials.readTokenStorageFile(args.source, conf); + } else { + StringBuffer origin = new StringBuffer(); + File file = locateEnvCredentials(System.getenv(), conf, + origin); + if (file != null) { + log.info("Credential Source {}", origin); + } else { + log.info("Credential source: logged in user"); + } + credentials = userCredentials; + } + // list the tokens + log.info("\n{}", dumpTokens(credentials, "\n")); + if (!footnote.isEmpty()) { + log.info(footnote); + } + return 0; + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ipc/SliderApplicationIpcClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ipc/SliderApplicationIpcClient.java new file mode 100644 index 00000000000..a0073264c2f --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ipc/SliderApplicationIpcClient.java @@ -0,0 +1,245 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client.ipc; + +import com.google.common.base.Preconditions; +import org.apache.slider.api.SliderClusterProtocol; +import org.apache.slider.api.types.ApplicationLivenessInformation; +import org.apache.slider.api.types.ComponentInformation; +import org.apache.slider.api.types.ContainerInformation; +import org.apache.slider.api.types.NodeInformation; +import org.apache.slider.api.types.NodeInformationList; +import org.apache.slider.api.types.PingInformation; +import org.apache.slider.api.SliderApplicationApi; +import org.apache.slider.core.conf.AggregateConf; +import org.apache.slider.core.conf.ConfTree; +import org.apache.slider.core.conf.ConfTreeOperations; +import org.apache.slider.core.exceptions.NoSuchNodeException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Map; + +/** + * Implementation of the Slider RESTy Application API over IPC. + *

+ * Operations are executed via the {@link SliderClusterOperations} + * instance passed in; raised exceptions may be converted into ones + * consistent with the REST API. + */ +public class SliderApplicationIpcClient implements SliderApplicationApi { + + private static final Logger log = + LoggerFactory.getLogger(SliderApplicationIpcClient.class); + + private final SliderClusterOperations operations; + + public SliderApplicationIpcClient(SliderClusterOperations operations) { + Preconditions.checkArgument(operations != null, "null operations"); + this.operations = operations; + } + + /** + * Convert received (And potentially unmarshalled) local/remote + * exceptions into the equivalents in the REST API. + * Best effort. + *

+ * If there is no translation, the original exception is returned. + *

+ * If a new exception was created, it will have the message of the + * string value of the original exception, and that original + * exception will be the nested cause of this one + * @param exception IOException to convert + * @return an exception to throw + */ + private IOException convert(IOException exception) { + IOException result = exception; + if (exception instanceof NoSuchNodeException) { + result = new FileNotFoundException(exception.toString()); + result.initCause(exception); + } else { + // TODO: remap any other exceptions + } + return result; + } + + public SliderApplicationIpcClient(SliderClusterProtocol proxy) { + this(new SliderClusterOperations(proxy)); + } + + @Override + public AggregateConf getDesiredModel() throws IOException { + try { + return operations.getModelDesired(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public ConfTreeOperations getDesiredAppconf() throws IOException { + try { + return operations.getModelDesiredAppconf(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public ConfTreeOperations getDesiredResources() throws IOException { + try { + return operations.getModelDesiredResources(); + } catch (IOException e) { + throw convert(e); + } + } + + + @Override + public void putDesiredResources(ConfTree updated) throws IOException { + try { + operations.flex(updated); + } catch (IOException e) { + throw convert(e); + } + } + + + @Override + public AggregateConf getResolvedModel() throws IOException { + try { + return operations.getModelResolved(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public ConfTreeOperations getResolvedAppconf() throws IOException { + try { + return operations.getModelResolvedAppconf(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public ConfTreeOperations getResolvedResources() throws IOException { + try { + return operations.getModelResolvedResources(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public ConfTreeOperations getLiveResources() throws IOException { + try { + return operations.getLiveResources(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public Map enumContainers() throws IOException { + try { + return operations.enumContainers(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public ContainerInformation getContainer(String containerId) throws + IOException { + try { + return operations.getContainer(containerId); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public Map enumComponents() throws IOException { + try { + return operations.enumComponents(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public ComponentInformation getComponent(String componentName) throws IOException { + try { + return operations.getComponent(componentName); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public NodeInformationList getLiveNodes() throws IOException { + try { + return operations.getLiveNodes(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public NodeInformation getLiveNode(String hostname) throws IOException { + try { + return operations.getLiveNode(hostname); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public PingInformation ping(String text) throws IOException { + return null; + } + + @Override + public void stop(String text) throws IOException { + try { + operations.stop(text); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public ApplicationLivenessInformation getApplicationLiveness() throws + IOException { + try { + return operations.getApplicationLiveness(); + } catch (IOException e) { + throw convert(e); + } + } + + @Override + public String toString() { + return "IPC implementation of SliderApplicationApi bonded to " + operations; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ipc/SliderClusterOperations.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ipc/SliderClusterOperations.java new file mode 100644 index 00000000000..392f451c89e --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/ipc/SliderClusterOperations.java @@ -0,0 +1,529 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client.ipc; + +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import org.apache.hadoop.yarn.api.records.NodeReport; +import org.apache.hadoop.yarn.api.records.NodeState; +import org.apache.hadoop.yarn.exceptions.YarnException; +import org.apache.slider.api.ClusterDescription; +import org.apache.slider.api.ClusterNode; +import org.apache.slider.api.SliderClusterProtocol; +import org.apache.slider.api.StateValues; +import org.apache.slider.api.proto.Messages; + +import static org.apache.slider.api.proto.RestTypeMarshalling.*; +import org.apache.slider.api.types.ApplicationLivenessInformation; +import org.apache.slider.api.types.ComponentInformation; +import org.apache.slider.api.types.ContainerInformation; +import org.apache.slider.api.types.NodeInformation; +import org.apache.slider.api.types.NodeInformationList; +import org.apache.slider.api.types.PingInformation; +import org.apache.slider.common.tools.Duration; +import org.apache.slider.common.tools.SliderUtils; +import org.apache.slider.core.conf.AggregateConf; +import org.apache.slider.core.conf.ConfTree; +import org.apache.slider.core.conf.ConfTreeOperations; +import org.apache.slider.core.exceptions.NoSuchNodeException; +import org.apache.slider.core.exceptions.SliderException; +import org.apache.slider.core.exceptions.WaitTimeoutException; +import org.apache.slider.core.persist.ConfTreeSerDeser; +import org.apache.slider.server.services.security.SecurityStore; +import org.apache.slider.server.services.security.SignCertResponse; +import org.codehaus.jackson.JsonParseException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Cluster operations at a slightly higher level than the RPC code + */ +public class SliderClusterOperations { + protected static final Logger + log = LoggerFactory.getLogger(SliderClusterOperations.class); + + private final SliderClusterProtocol appMaster; + private static final Messages.EmptyPayloadProto EMPTY; + static { + EMPTY = Messages.EmptyPayloadProto.newBuilder().build(); + } + + public SliderClusterOperations(SliderClusterProtocol appMaster) { + this.appMaster = appMaster; + } + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder("SliderClusterOperations{"); + sb.append("IPC binding=").append(appMaster); + sb.append('}'); + return sb.toString(); + } + + /** + * Get a node from the AM + * @param uuid uuid of node + * @return deserialized node + * @throws IOException IO problems + * @throws NoSuchNodeException if the node isn't found + */ + public ClusterNode getNode(String uuid) + throws IOException, NoSuchNodeException, YarnException { + Messages.GetNodeRequestProto req = + Messages.GetNodeRequestProto.newBuilder().setUuid(uuid).build(); + Messages.GetNodeResponseProto node = appMaster.getNode(req); + return ClusterNode.fromProtobuf(node.getClusterNode()); + } + + /** + * Unmarshall a list of nodes from a protobud response + * @param nodes node list + * @return possibly empty list of cluster nodes + * @throws IOException + */ + public List convertNodeWireToClusterNodes(List nodes) + throws IOException { + List nodeList = new ArrayList<>(nodes.size()); + for (Messages.RoleInstanceState node : nodes) { + nodeList.add(ClusterNode.fromProtobuf(node)); + } + return nodeList; + } + + /** + * Echo text (debug action) + * @param text text + * @return the text, echoed back + * @throws YarnException + * @throws IOException + */ + public String echo(String text) throws YarnException, IOException { + Messages.EchoRequestProto.Builder builder = + Messages.EchoRequestProto.newBuilder(); + builder.setText(text); + Messages.EchoRequestProto req = builder.build(); + Messages.EchoResponseProto response = appMaster.echo(req); + return response.getText(); + } + + + /** + * Connect to a live cluster and get its current state + * @return its description + */ + public ClusterDescription getClusterDescription() + throws YarnException, IOException { + + Messages.GetJSONClusterStatusRequestProto req = + Messages.GetJSONClusterStatusRequestProto.newBuilder().build(); + Messages.GetJSONClusterStatusResponseProto resp = + appMaster.getJSONClusterStatus(req); + String statusJson = resp.getClusterSpec(); + try { + return ClusterDescription.fromJson(statusJson); + } catch (JsonParseException e) { + log.error("Exception " + e + " parsing:\n" + statusJson, e); + throw e; + } + } + + /** + * Get the AM instance definition. + *

+ * See {@link SliderClusterProtocol#getInstanceDefinition(Messages.GetInstanceDefinitionRequestProto)} + * @return current slider AM aggregate definition + * @throws YarnException + * @throws IOException + */ + public AggregateConf getInstanceDefinition() + throws YarnException, IOException { + Messages.GetInstanceDefinitionRequestProto.Builder builder = + Messages.GetInstanceDefinitionRequestProto.newBuilder(); + + Messages.GetInstanceDefinitionRequestProto request = builder.build(); + Messages.GetInstanceDefinitionResponseProto response = + appMaster.getInstanceDefinition(request); + + ConfTreeSerDeser confTreeSerDeser = new ConfTreeSerDeser(); + + ConfTree internal = confTreeSerDeser.fromJson(response.getInternal()); + ConfTree resources = confTreeSerDeser.fromJson(response.getResources()); + ConfTree app = confTreeSerDeser.fromJson(response.getApplication()); + AggregateConf instanceDefinition = + new AggregateConf(resources, app, internal); + return instanceDefinition; + } + /** + * Kill a container + * @param id container ID + * @return a success flag + * @throws YarnException + * @throws IOException + */ + public boolean killContainer(String id) throws + YarnException, + IOException { + Messages.KillContainerRequestProto.Builder builder = + Messages.KillContainerRequestProto.newBuilder(); + builder.setId(id); + Messages.KillContainerRequestProto req = builder.build(); + Messages.KillContainerResponseProto response = appMaster.killContainer(req); + return response.getSuccess(); + } + + /** + * List all node UUIDs in a role + * @param role role name or "" for all + * @return an array of UUID strings + * @throws IOException + * @throws YarnException + */ + public String[] listNodeUUIDsByRole(String role) throws IOException, YarnException { + Collection uuidList = innerListNodeUUIDSByRole(role); + String[] uuids = new String[uuidList.size()]; + return uuidList.toArray(uuids); + } + + public List innerListNodeUUIDSByRole(String role) throws IOException, YarnException { + Messages.ListNodeUUIDsByRoleRequestProto req = + Messages.ListNodeUUIDsByRoleRequestProto + .newBuilder() + .setRole(role) + .build(); + Messages.ListNodeUUIDsByRoleResponseProto resp = appMaster.listNodeUUIDsByRole(req); + return resp.getUuidList(); + } + + /** + * List all nodes in a role. This is a double round trip: once to list + * the nodes in a role, another to get their details + * @param role + * @return an array of ContainerNode instances + * @throws IOException + * @throws YarnException + */ + public List listClusterNodesInRole(String role) + throws IOException, YarnException { + + Collection uuidList = innerListNodeUUIDSByRole(role); + Messages.GetClusterNodesRequestProto req = + Messages.GetClusterNodesRequestProto + .newBuilder() + .addAllUuid(uuidList) + .build(); + Messages.GetClusterNodesResponseProto resp = appMaster.getClusterNodes(req); + return convertNodeWireToClusterNodes(resp.getClusterNodeList()); + } + + /** + * Get the details on a list of uuids + * @param uuids instance IDs + * @return a possibly empty list of node details + * @throws IOException + * @throws YarnException + */ + @VisibleForTesting + public List listClusterNodes(String[] uuids) + throws IOException, YarnException { + + Messages.GetClusterNodesRequestProto req = + Messages.GetClusterNodesRequestProto + .newBuilder() + .addAllUuid(Arrays.asList(uuids)) + .build(); + Messages.GetClusterNodesResponseProto resp = appMaster.getClusterNodes(req); + return convertNodeWireToClusterNodes(resp.getClusterNodeList()); + } + + /** + * Wait for an instance of a named role to be live (or past it in the lifecycle) + * @param role role to look for + * @param timeout time to wait + * @return the state. If still in CREATED, the cluster didn't come up + * in the time period. If LIVE, all is well. If >LIVE, it has shut for a reason + * @throws IOException IO + * @throws SliderException Slider + * @throws WaitTimeoutException if the wait timed out + */ + @VisibleForTesting + public int waitForRoleInstanceLive(String role, long timeout) + throws WaitTimeoutException, IOException, YarnException { + Duration duration = new Duration(timeout); + duration.start(); + boolean live = false; + int state = StateValues.STATE_CREATED; + + log.info("Waiting {} millis for a live node in role {}", timeout, role); + try { + while (!live) { + // see if there is a node in that role yet + List uuids = innerListNodeUUIDSByRole(role); + String[] containers = uuids.toArray(new String[uuids.size()]); + int roleCount = containers.length; + ClusterNode roleInstance = null; + if (roleCount != 0) { + + // if there is, get the node + roleInstance = getNode(containers[0]); + if (roleInstance != null) { + state = roleInstance.state; + live = state >= StateValues.STATE_LIVE; + } + } + if (!live) { + if (duration.getLimitExceeded()) { + throw new WaitTimeoutException( + String.format("Timeout after %d millis" + + " waiting for a live instance of type %s; " + + "instances found %d %s", + timeout, role, roleCount, + (roleInstance != null + ? (" instance -\n" + roleInstance.toString()) + : "") + )); + } else { + try { + Thread.sleep(1000); + } catch (InterruptedException ignored) { + // ignored + } + } + } + } + } finally { + duration.close(); + } + return state; + } + + /** + * Flex operation + * @param resources new resources + * @return the response + * @throws IOException + */ + public boolean flex(ConfTree resources) throws IOException { + Messages.FlexClusterRequestProto request = + Messages.FlexClusterRequestProto.newBuilder() + .setClusterSpec(resources.toJson()) + .build(); + Messages.FlexClusterResponseProto response = appMaster.flexCluster(request); + return response.getResponse(); + } + + + /** + * Commit (possibly delayed) AM suicide + * + * @param signal exit code + * @param text text text to log + * @param delay delay in millis + * @throws YarnException + * @throws IOException + */ + public void amSuicide(String text, int signal, int delay) + throws IOException { + Messages.AMSuicideRequestProto.Builder builder = + Messages.AMSuicideRequestProto.newBuilder(); + if (text != null) { + builder.setText(text); + } + builder.setSignal(signal); + builder.setDelay(delay); + Messages.AMSuicideRequestProto req = builder.build(); + appMaster.amSuicide(req); + } + + /** + * Get the application liveness + * @return current liveness information + * @throws IOException + */ + public ApplicationLivenessInformation getLivenessInformation() throws IOException { + Messages.GetApplicationLivenessRequestProto.Builder builder = + Messages.GetApplicationLivenessRequestProto.newBuilder(); + Messages.ApplicationLivenessInformationProto wire = + appMaster.getLivenessInformation(builder.build()); + return unmarshall(wire); + + } + + public AggregateConf getModelDesired() throws IOException { + return unmarshallToAggregateConf(appMaster.getModelDesired(EMPTY)); + } + + + public ConfTreeOperations getModelDesiredAppconf() throws IOException { + return unmarshallToCTO(appMaster.getModelDesiredAppconf(EMPTY)); + } + + + public ConfTreeOperations getModelDesiredResources() throws IOException { + return unmarshallToCTO(appMaster.getModelDesiredResources(EMPTY)); + } + + + public AggregateConf getModelResolved() throws IOException { + return unmarshallToAggregateConf(appMaster.getModelResolved(EMPTY)); + } + + + public ConfTreeOperations getModelResolvedAppconf() throws IOException { + return unmarshallToCTO(appMaster.getModelResolvedAppconf(EMPTY)); + } + + + public ConfTreeOperations getModelResolvedResources() throws IOException { + return unmarshallToCTO(appMaster.getModelDesiredResources(EMPTY)); + } + + + public ConfTreeOperations getLiveResources() throws IOException { + return unmarshallToCTO(appMaster.getLiveResources(EMPTY)); + } + + + public Map enumContainers() throws IOException { + Messages.GetLiveContainersResponseProto response = + appMaster.getLiveContainers( + Messages.GetLiveContainersRequestProto.newBuilder().build()); + + int namesCount = response.getNamesCount(); + int records = response.getContainersCount(); + if (namesCount != records) { + throw new IOException("Number of names returned (" + namesCount + + ") does not match the number of records returned: " + + records); + } + Map map = new HashMap<>(namesCount); + for (int i = 0; i < namesCount; i++) { + map.put(response.getNames(i), unmarshall(response.getContainers(i))); + } + return map; + } + + + public ContainerInformation getContainer(String containerId) throws + IOException { + Messages.ContainerInformationProto response = + appMaster.getLiveContainer( + Messages.GetLiveContainerRequestProto.newBuilder() + .setContainerId(containerId) + .build()); + return unmarshall(response); + } + + public List getContainers() throws IOException { + Messages.GetLiveContainersResponseProto response = appMaster + .getLiveContainers(Messages.GetLiveContainersRequestProto.newBuilder() + .build()); + return unmarshall(response); + } + + public Map enumComponents() throws IOException { + Messages.GetLiveComponentsResponseProto response = + appMaster.getLiveComponents( + Messages.GetLiveComponentsRequestProto.newBuilder().build()); + + int namesCount = response.getNamesCount(); + int records = response.getComponentsCount(); + if (namesCount != records) { + throw new IOException( + "Number of names returned (" + namesCount + ")" + + " does not match the number of records returned: " + records); + } + Map map = new HashMap<>(namesCount); + for (int i = 0; i < namesCount; i++) { + map.put(response.getNames(i), unmarshall(response.getComponents(i))); + } + return map; + } + + public ComponentInformation getComponent(String componentName) + throws IOException { + Messages.GetLiveComponentRequestProto.Builder builder = + Messages.GetLiveComponentRequestProto.newBuilder(); + builder.setName(componentName); + Messages.ComponentInformationProto proto = appMaster.getLiveComponent(builder.build()); + return unmarshall(proto); + } + + public NodeInformationList getLiveNodes() throws IOException { + Messages.GetLiveNodesResponseProto response = + appMaster.getLiveNodes(Messages.GetLiveNodesRequestProto.newBuilder().build()); + + int records = response.getNodesCount(); + NodeInformationList nil = new NodeInformationList(records); + for (int i = 0; i < records; i++) { + nil.add(unmarshall(response.getNodes(i))); + } + return nil; + } + + public NodeInformation getLiveNode(String hostname) throws IOException { + Messages.GetLiveNodeRequestProto.Builder builder = + Messages.GetLiveNodeRequestProto.newBuilder(); + builder.setName(hostname); + return unmarshall(appMaster.getLiveNode(builder.build())); + } + + public PingInformation ping(String text) throws IOException { + return null; + } + + public void stop(String text) throws IOException { + amSuicide(text, 3, 0); + } + + public ApplicationLivenessInformation getApplicationLiveness() throws + IOException { + Messages.ApplicationLivenessInformationProto proto = + appMaster.getLivenessInformation( + Messages.GetApplicationLivenessRequestProto.newBuilder().build() + ); + return unmarshall(proto); + } + + public byte[] getClientCertificateStore(String hostname, String clientId, + String password, String type) throws IOException { + Messages.GetCertificateStoreRequestProto.Builder + builder = Messages.GetCertificateStoreRequestProto.newBuilder(); + if (hostname != null) { + builder.setHostname(hostname); + } + Messages.GetCertificateStoreRequestProto requestProto = + builder.setRequesterId(clientId) + .setPassword(password) + .setType(type) + .build(); + Messages.GetCertificateStoreResponseProto response = + appMaster.getClientCertificateStore(requestProto); + + return unmarshall(response); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/BaseRestClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/BaseRestClient.java new file mode 100644 index 00000000000..d936a22d529 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/BaseRestClient.java @@ -0,0 +1,152 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client.rest; + +import com.google.common.base.Preconditions; +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.ClientHandlerException; +import com.sun.jersey.api.client.GenericType; +import com.sun.jersey.api.client.UniformInterfaceException; +import com.sun.jersey.api.client.WebResource; +import org.apache.slider.core.exceptions.ExceptionConverter; +import org.apache.slider.core.restclient.HttpVerb; +import org.apache.slider.core.restclient.UgiJerseyBinding; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.ws.rs.core.MediaType; +import java.io.IOException; +import java.net.URI; + + +/** + * This is a base class for Jersey REST clients in Slider. + * It supports the execution of operations —with + * exceptions uprated to IOExceptions when needed. + *

+ * Subclasses can use these operations to provide an API-like view + * of the REST model + */ +public class BaseRestClient { + private static final Logger log = + LoggerFactory.getLogger(BaseRestClient.class); + private final Client client; + + public BaseRestClient( + Client client) { + Preconditions.checkNotNull(client, "null jersey client"); + this.client = client; + } + + /** + * Get the jersey client + * @return jersey client + */ + public Client getClient() { + return client; + } + + /** + * Execute the operation. Failures are raised as IOException subclasses + * @param method method to execute + * @param resource resource to work against + * @param c class to build + * @param type expected + * @return an instance of the type T + * @throws IOException on any failure + */ + public T exec(HttpVerb method, WebResource resource, Class c) + throws IOException { + try { + Preconditions.checkArgument(c != null); + log.debug("{}} {}", method, resource.getURI()); + return resource.accept(MediaType.APPLICATION_JSON_TYPE) + .method(method.getVerb(), c); + } catch (ClientHandlerException ex) { + throw ExceptionConverter.convertJerseyException(method.getVerb(), + resource.getURI().toString(), + ex); + } catch (UniformInterfaceException ex) { + throw UgiJerseyBinding.uprateFaults(method, + resource.getURI().toString(), + ex); + } + } + + /** + * Execute the operation. Failures are raised as IOException subclasses + * @param method method to execute + * @param resource resource to work against + * @param t type to work with + * @param type expected + * @return an instance of the type T + * @throws IOException on any failure + */ + public T exec(HttpVerb method, WebResource resource, GenericType t) + throws IOException { + try { + Preconditions.checkArgument(t != null); + log.debug("{}} {}", method, resource.getURI()); + resource.accept(MediaType.APPLICATION_JSON_TYPE); + return resource.method(method.getVerb(), t); + } catch (ClientHandlerException ex) { + throw ExceptionConverter.convertJerseyException(method.getVerb(), + resource.getURI().toString(), + ex); + } catch (UniformInterfaceException ex) { + throw UgiJerseyBinding.uprateFaults(method, resource.getURI().toString(), + ex); + } + } + + + /** + * Execute the GET operation. Failures are raised as IOException subclasses + * @param resource resource to work against + * @param c class to build + * @param type expected + * @return an instance of the type T + * @throws IOException on any failure + */ + public T get(WebResource resource, Class c) throws IOException { + return exec(HttpVerb.GET, resource, c); + } + + /** + * Create a Web resource from the client. + * + * @param u the URI of the resource. + * @return the Web resource. + */ + public WebResource resource(URI u) { + return client.resource(u); + } + + /** + * Create a Web resource from the client. + * + * @param u the URI of the resource. + * @return the Web resource. + */ + + public WebResource resource(String url) { + return client.resource(url); + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/RestClientFactory.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/RestClientFactory.java new file mode 100644 index 00000000000..4286596b6b5 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/RestClientFactory.java @@ -0,0 +1,89 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client.rest; + +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.WebResource; +import org.apache.hadoop.registry.client.api.RegistryOperations; +import org.apache.slider.client.ClientRegistryBinder; +import org.apache.slider.api.SliderApplicationApi; +import org.apache.slider.core.registry.info.CustomRegistryConstants; + +import java.io.IOException; + +import static org.apache.slider.server.appmaster.web.rest.RestPaths.SLIDER_PATH_APPLICATION; + +/** + * Factory for the Rest client; hides the lookup and instantiation. + *

+ * + */ +public class RestClientFactory { + + private final ClientRegistryBinder binder; + private final Client jerseyClient; + private final String user, serviceclass, instance; + + public RestClientFactory(RegistryOperations operations, + Client jerseyClient, + String user, + String serviceclass, + String instance) { + this.jerseyClient = jerseyClient; + this.user = user; + this.serviceclass = serviceclass; + this.instance = instance; + binder = new ClientRegistryBinder(operations); + } + + /** + * Locate the AM + * @return a resource to the AM + * @throws IOException any failure to resolve to the AM + */ + private WebResource locateAppmaster() throws IOException { + String restAPI = binder.lookupExternalRestAPI(user, serviceclass, instance, + CustomRegistryConstants.AM_REST_BASE); + return jerseyClient.resource(restAPI); + } + + /** + * Locate the slider AM then instantiate a client instance against + * its Application API. + * @return the instance + * @throws IOException on any failure + */ + public SliderApplicationApi createSliderAppApiClient() throws IOException { + WebResource appmaster = locateAppmaster(); + return createSliderAppApiClient(appmaster); + } + + /** + * Create a Slider application API client instance against + * its Application API. + * @param appmaster The AM to work against. + * @return the instance + * @throws IOException on any failure + */ + public SliderApplicationApi createSliderAppApiClient(WebResource appmaster) { + WebResource appResource = appmaster.path(SLIDER_PATH_APPLICATION); + return new SliderApplicationApiRestClient(jerseyClient, appResource); + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/SliderApplicationApiRestClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/SliderApplicationApiRestClient.java new file mode 100644 index 00000000000..4283ee802c4 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/client/rest/SliderApplicationApiRestClient.java @@ -0,0 +1,326 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.client.rest; + +import com.google.common.base.Preconditions; +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.ClientHandlerException; +import com.sun.jersey.api.client.GenericType; +import com.sun.jersey.api.client.UniformInterfaceException; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.representation.Form; +import org.apache.commons.lang.StringUtils; +import org.apache.slider.api.types.ApplicationLivenessInformation; +import org.apache.slider.api.types.ComponentInformation; +import org.apache.slider.api.types.ContainerInformation; +import org.apache.slider.api.SliderApplicationApi; +import org.apache.slider.api.types.NodeInformation; +import org.apache.slider.api.types.NodeInformationList; +import org.apache.slider.core.conf.AggregateConf; +import org.apache.slider.core.conf.ConfTree; +import org.apache.slider.core.conf.ConfTreeOperations; +import org.apache.slider.core.exceptions.ExceptionConverter; +import org.apache.slider.core.restclient.HttpVerb; +import org.apache.slider.api.types.PingInformation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.ws.rs.core.MediaType; +import java.io.IOException; +import java.util.Map; + +import static org.apache.slider.server.appmaster.web.rest.RestPaths.*; + +/** + * Implementation of the {@link SliderApplicationApi} + */ +public class SliderApplicationApiRestClient extends BaseRestClient + implements SliderApplicationApi { + private static final Logger log = + LoggerFactory.getLogger(SliderApplicationApiRestClient.class); + private WebResource appResource; + + /** + * Create an instance + * @param jerseyClient jersey client for operations + * @param appResource resource of application API + */ + public SliderApplicationApiRestClient(Client jerseyClient, + WebResource appResource) { + super(jerseyClient); + this.appResource = appResource; + } + + /** + * Create an instance + * @param jerseyClient jersey client for operations + * @param appmaster URL of appmaster/proxy to AM + */ + public SliderApplicationApiRestClient(Client jerseyClient, String appmaster) { + super(jerseyClient); + WebResource amResource = jerseyClient.resource(appmaster); + amResource.type(MediaType.APPLICATION_JSON); + this.appResource = amResource.path(SLIDER_PATH_APPLICATION); + } + + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder("SliderApplicationApiRestClient{"); + sb.append("appResource=").append(appResource); + sb.append('}'); + return sb.toString(); + } + + /** + * Create a resource under the application path + * @param subpath path under application + * @return a resource under the application path + */ + public WebResource applicationResource(String subpath) { + Preconditions.checkArgument(!StringUtils.isEmpty(subpath), + "empty path"); + Preconditions.checkNotNull(appResource, "Null app resource"); + return appResource.path(subpath); + } + + /** + * Get operation against a path under the Application + * @param type expected + * @param subpath path + * @param c class to instantiate + * @return instance + * @throws IOException on any problem + */ + public T getApplicationResource(String subpath, Class c) + throws IOException { + return appResourceOperation(HttpVerb.GET, subpath, c); + } + + /** + * Get operation against a path under the Application + * @param type expected + * @param subpath path + * @param t type info + * @return instance + * @throws IOException on any problem + */ + public T getApplicationResource(String subpath, GenericType t) + throws IOException { + return appResourceOperation(HttpVerb.GET, subpath, t); + } + + /** + * + * @param method method to exec + * @param type expected + * @param subpath path + * @param c class to instantiate + * @return instance + * @throws IOException on any problem + */ + public T appResourceOperation(HttpVerb method, String subpath, Class c) + throws IOException { + return exec(method, applicationResource(subpath), c); + } + + + /** + * Get operation against a path under the Application + * @param type expected + * @param subpath path + * @param t type info + * @return instance + * @throws IOException on any problem + */ + public T appResourceOperation(HttpVerb method, String subpath, + GenericType t) + throws IOException { + return exec(method, applicationResource(subpath), t); + } + + + @Override + public AggregateConf getDesiredModel() throws IOException { + return getApplicationResource(MODEL_DESIRED, AggregateConf.class); + } + + @Override + public ConfTreeOperations getDesiredAppconf() throws IOException { + ConfTree resource = + getApplicationResource(MODEL_DESIRED_APPCONF, ConfTree.class); + return new ConfTreeOperations(resource); + } + + @Override + public ConfTreeOperations getDesiredResources() throws IOException { + ConfTree resource = + getApplicationResource(MODEL_DESIRED_RESOURCES, ConfTree.class); + return new ConfTreeOperations(resource); + } + + @Override + public void putDesiredResources(ConfTree updated) throws IOException { + WebResource resource = applicationResource(MODEL_DESIRED_RESOURCES); + try { + + // put operation. The result is discarded; it does help validate + // that the operation returned a JSON data structure as well as a 200 + // response. + + resource.accept(MediaType.APPLICATION_JSON_TYPE) + .type(MediaType.APPLICATION_JSON_TYPE) + .entity(updated) + .put(ConfTree.class); + } catch (ClientHandlerException ex) { + throw ExceptionConverter.convertJerseyException("PUT", + resource.getURI().toString(), + ex); + } catch (UniformInterfaceException ex) { + throw ExceptionConverter.convertJerseyException("PUT", + resource.getURI().toString(), ex); + } + } + + @Override + public AggregateConf getResolvedModel() throws IOException { + return getApplicationResource(MODEL_RESOLVED, AggregateConf.class); + } + + + @Override + public ConfTreeOperations getResolvedAppconf() throws IOException { + ConfTree resource = + getApplicationResource(MODEL_RESOLVED_APPCONF, ConfTree.class); + return new ConfTreeOperations(resource); + } + + @Override + public ConfTreeOperations getResolvedResources() throws IOException { + ConfTree resource = + getApplicationResource(MODEL_RESOLVED_RESOURCES, ConfTree.class); + return new ConfTreeOperations(resource); + } + + @Override + public ConfTreeOperations getLiveResources() throws IOException { + ConfTree resource = + getApplicationResource(LIVE_RESOURCES, ConfTree.class); + return new ConfTreeOperations(resource); + } + + @Override + public Map enumContainers() throws + IOException { + return getApplicationResource(LIVE_CONTAINERS, + new GenericType>() { + }); + } + + @Override + public ContainerInformation getContainer(String containerId) throws + IOException { + return getApplicationResource(LIVE_CONTAINERS + "/" + containerId, + ContainerInformation.class); + } + + @Override + public Map enumComponents() throws + IOException { + return getApplicationResource(LIVE_COMPONENTS, + new GenericType>() { }); + } + + @Override + public ComponentInformation getComponent(String componentName) throws + IOException { + return getApplicationResource(LIVE_COMPONENTS + "/" + componentName, + ComponentInformation.class); + } + + @Override + public NodeInformationList getLiveNodes() throws IOException { + return getApplicationResource(LIVE_NODES, NodeInformationList.class); + } + + @Override + public NodeInformation getLiveNode(String hostname) throws IOException { + return getApplicationResource(LIVE_NODES + "/" + hostname, + NodeInformation.class); + } + + @Override + public PingInformation ping(String text) throws IOException { + return pingPost(text); + } + + /** + * Ping as a GET + * @param text text to include + * @return the response + * @throws IOException on any failure + */ + public PingInformation pingGet(String text) throws IOException { + WebResource pingResource = applicationResource(ACTION_PING); + pingResource.getUriBuilder().queryParam("body", text); + return pingResource.get(PingInformation.class); + } + + /** + * Ping as a POST + * @param text text to include + * @return the response + * @throws IOException on any failure + */ + public PingInformation pingPost(String text) throws IOException { + WebResource pingResource = applicationResource(ACTION_PING); + Form f = new Form(); + f.add("text", text); + return pingResource + .type(MediaType.APPLICATION_JSON_TYPE) + .post(PingInformation.class, f); + } + + /** + * Ping as a POST + * @param text text to include + * @return the response + * @throws IOException on any failure + */ + public PingInformation pingPut(String text) throws IOException { + WebResource pingResource = applicationResource(ACTION_PING); + Form f = new Form(); + return pingResource + .type(MediaType.TEXT_PLAIN) + .put(PingInformation.class, text); + } + + @Override + public void stop(String text) throws IOException { + WebResource resource = applicationResource(ACTION_STOP); + resource.post(text); + } + + @Override + public ApplicationLivenessInformation getApplicationLiveness() throws IOException { + return getApplicationResource(LIVE_LIVENESS, + ApplicationLivenessInformation.class); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/Constants.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/Constants.java new file mode 100644 index 00000000000..0e3559aee90 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/Constants.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common; + +public class Constants { + public static final int CONNECT_TIMEOUT = 10000; + public static final int RPC_TIMEOUT = 15000; + + public static final String HADOOP_JAAS_DEBUG = "HADOOP_JAAS_DEBUG"; + public static final String KRB5_CCNAME = "KRB5CCNAME"; + public static final String JAVA_SECURITY_KRB5_CONF + = "java.security.krb5.conf"; + public static final String JAVA_SECURITY_KRB5_REALM + = "java.security.krb5.realm"; + public static final String SUN_SECURITY_KRB5_DEBUG + = "sun.security.krb5.debug"; + public static final String SUN_SECURITY_SPNEGO_DEBUG + = "sun.security.spnego.debug"; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderExitCodes.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderExitCodes.java new file mode 100644 index 00000000000..5758f791989 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderExitCodes.java @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common; + +import org.apache.slider.core.main.LauncherExitCodes; + +public interface SliderExitCodes extends LauncherExitCodes { + + /** + * starting point for exit codes; not an exception itself + */ + int _EXIT_CODE_BASE = 64; + + /** + * service entered the failed state: {@value} + */ + int EXIT_YARN_SERVICE_FAILED = 65; + + /** + * service was killed: {@value} + */ + int EXIT_YARN_SERVICE_KILLED = 66; + + /** + * timeout on monitoring client: {@value} + */ + int EXIT_TIMED_OUT = 67; + + /** + * service finished with an error: {@value} + */ + int EXIT_YARN_SERVICE_FINISHED_WITH_ERROR = 68; + + /** + * the application instance is unknown: {@value} + */ + int EXIT_UNKNOWN_INSTANCE = 69; + + /** + * the application instance is in the wrong state for that operation: {@value} + */ + int EXIT_BAD_STATE = 70; + + /** + * A spawned master process failed + */ + int EXIT_PROCESS_FAILED = 71; + + /** + * The instance failed -too many containers were + * failing or some other threshold was reached + */ + int EXIT_DEPLOYMENT_FAILED = 72; + + /** + * The application is live -and the requested operation + * does not work if the cluster is running + */ + int EXIT_APPLICATION_IN_USE = 73; + + /** + * There already is an application instance of that name + * when an attempt is made to create a new instance + */ + int EXIT_INSTANCE_EXISTS = 75; + + /** + * Exit code when the configurations in valid/incomplete: {@value} + */ + int EXIT_BAD_CONFIGURATION = 77; + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderKeys.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderKeys.java new file mode 100644 index 00000000000..ba3effcd575 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderKeys.java @@ -0,0 +1,278 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common; + + +/** + * Keys and various constants for Slider + */ +public interface SliderKeys extends SliderXmlConfKeys { + + /** + * This is the name of the slider appmaster in configurations :{@value} + */ + String COMPONENT_AM = "slider-appmaster"; + + /** + * Slider role is "special":{@value} + */ + int ROLE_AM_PRIORITY_INDEX = 0; + + + /** + * The path under which cluster and temp data are stored + * {@value} + */ + String SLIDER_BASE_DIRECTORY = ".slider"; + + /** + * The paths under which Slider AM dependency libraries are stored + */ + String SLIDER_DEPENDENCY_LOCALIZED_DIR_LINK = "slider_dep"; + String SLIDER_DEPENDENCY_HDP_PARENT_DIR = "/hdp"; + String SLIDER_DEPENDENCY_DIR = "/apps/%s/slider"; + String SLIDER_DEPENDENCY_TAR_GZ_FILE_NAME = "slider"; + String SLIDER_DEPENDENCY_TAR_GZ_FILE_EXT = ".tar.gz"; + String SLIDER_DEPENDENCY_DIR_PERMISSIONS = "755"; + + /** + * + */ + String HDP_VERSION_PROP_NAME = "HDP_VERSION"; + + /** + * name of the relative path to expaned an image into: {@value}. + * The title of this path is to help people understand it when + * they see it in their error messages + */ + String LOCAL_TARBALL_INSTALL_SUBDIR = "expandedarchive"; + + + /** + * Application type for YARN {@value} + */ + String APP_TYPE = "org-apache-slider"; + + /** + * Key for application version. This must be set in app_config/global {@value} + */ + String APP_VERSION = "site.global.app_version"; + String APP_VERSION_UNKNOWN = "awaiting heartbeat..."; + + /** + * Keys for application container specific properties, like release timeout + */ + String APP_CONTAINER_RELEASE_TIMEOUT = "site.global.app_container.release_timeout_secs"; + int APP_CONTAINER_HEARTBEAT_INTERVAL_SEC = 10; // look for HEARTBEAT_IDDLE_INTERVAL_SEC + + /** + * JVM arg to force IPv4 {@value} + */ + String JVM_ENABLE_ASSERTIONS = "-ea"; + + /** + * JVM arg enable JVM system/runtime {@value} + */ + String JVM_ENABLE_SYSTEM_ASSERTIONS = "-esa"; + + /** + * JVM arg to force IPv4 {@value} + */ + String JVM_FORCE_IPV4 = "-Djava.net.preferIPv4Stack=true"; + + /** + * JVM arg to go headless {@value} + */ + + String JVM_JAVA_HEADLESS = "-Djava.awt.headless=true"; + + /** + * This is the name of the dir/subdir containing + * the hbase conf that is propagated via YARN + * {@value} + */ + String PROPAGATED_CONF_DIR_NAME = "propagatedconf"; + String INFRA_DIR_NAME = "infra"; + String GENERATED_CONF_DIR_NAME = "generated"; + String SNAPSHOT_CONF_DIR_NAME = "snapshot"; + String DATA_DIR_NAME = "database"; + String HISTORY_DIR_NAME = "history"; + String HISTORY_FILENAME_SUFFIX = "json"; + String HISTORY_FILENAME_PREFIX = "rolehistory-"; + String KEYTAB_DIR = "keytabs"; + String RESOURCE_DIR = "resources"; + + /** + * Filename pattern is required to save in strict temporal order. + * Important: older files must sort less-than newer files when using + * case-sensitive name sort. + */ + String HISTORY_FILENAME_CREATION_PATTERN = HISTORY_FILENAME_PREFIX +"%016x."+ + HISTORY_FILENAME_SUFFIX; + /** + * The posix regexp used to locate this + */ + String HISTORY_FILENAME_MATCH_PATTERN = HISTORY_FILENAME_PREFIX +"[0-9a-f]+\\."+ + HISTORY_FILENAME_SUFFIX; + /** + * The posix regexp used to locate this + */ + String HISTORY_FILENAME_GLOB_PATTERN = HISTORY_FILENAME_PREFIX +"*."+ + HISTORY_FILENAME_SUFFIX; + /** + * XML resource listing the standard Slider providers + * {@value} + */ + String SLIDER_XML = "org/apache/slider/slider.xml"; + + String CLUSTER_DIRECTORY = "cluster"; + + String PACKAGE_DIRECTORY = "package"; + + /** + * JVM property to define the slider configuration directory; + * this is set by the slider script: {@value} + */ + String PROPERTY_CONF_DIR = "slider.confdir"; + + /** + * JVM property to define the slider lib directory; + * this is set by the slider script: {@value} + */ + String PROPERTY_LIB_DIR = "slider.libdir"; + + /** + * name of generated dir for this conf: {@value} + */ + String SUBMITTED_CONF_DIR = "confdir"; + + /** + * Slider AM log4j file name : {@value} + */ + String LOG4J_SERVER_PROP_FILENAME = "log4j-server.properties"; + + /** + * Standard log4j file name : {@value} + */ + String LOG4J_PROP_FILENAME = "log4j.properties"; + + /** + * Log4j sysprop to name the resource :{@value} + */ + String SYSPROP_LOG4J_CONFIGURATION = "log4j.configuration"; + + /** + * sysprop for Slider AM log4j directory :{@value} + */ + String SYSPROP_LOG_DIR = "LOG_DIR"; + + /** + * name of the Slider client resource + * loaded when the service is loaded. + */ + String SLIDER_CLIENT_XML = "slider-client.xml"; + + /** + * The name of the resource to put on the classpath + */ + String SLIDER_SERVER_XML = "slider-server.xml"; + + String TMP_LOGDIR_PREFIX = "/tmp/slider-"; + String TMP_DIR_PREFIX = "tmp"; + String AM_DIR_PREFIX = "appmaster"; + + /** + * Store the default app definition, e.g. metainfo file or content of a folder + */ + String APP_DEF_DIR = "appdef"; + /** + * Store additional app defs - co-processors + */ + String ADDONS_DIR = "addons"; + + String SLIDER_JAR = "slider.jar"; + String JCOMMANDER_JAR = "jcommander.jar"; + String GSON_JAR = "gson.jar"; + String AGENT_TAR = "slider-agent.tar.gz"; + String DEFAULT_APP_PKG = "appPkg.zip"; + + String DEFAULT_JVM_HEAP = "256M"; + int DEFAULT_YARN_MEMORY = 256; + String STDOUT_AM = "slider-out.txt"; + String STDERR_AM = "slider-err.txt"; + String DEFAULT_GC_OPTS = ""; + + String HADOOP_USER_NAME = "HADOOP_USER_NAME"; + String HADOOP_PROXY_USER = "HADOOP_PROXY_USER"; + String SLIDER_PASSPHRASE = "SLIDER_PASSPHRASE"; + + boolean PROPAGATE_RESOURCE_OPTION = true; + + /** + * Security associated keys. + */ + String SECURITY_DIR = "security"; + String CRT_FILE_NAME = "ca.crt"; + String CSR_FILE_NAME = "ca.csr"; + String KEY_FILE_NAME = "ca.key"; + String KEYSTORE_FILE_NAME = "keystore.p12"; + String CRT_PASS_FILE_NAME = "pass.txt"; + String PASS_LEN = "50"; + + String COMP_STORES_REQUIRED_KEY = + "slider.component.security.stores.required"; + String COMP_KEYSTORE_PASSWORD_PROPERTY_KEY = + "slider.component.keystore.password.property"; + String COMP_KEYSTORE_PASSWORD_ALIAS_KEY = + "slider.component.keystore.credential.alias.property"; + String COMP_KEYSTORE_PASSWORD_ALIAS_DEFAULT = + "component.keystore.credential.alias"; + String COMP_TRUSTSTORE_PASSWORD_PROPERTY_KEY = + "slider.component.truststore.password.property"; + String COMP_TRUSTSTORE_PASSWORD_ALIAS_KEY = + "slider.component.truststore.credential.alias.property"; + String COMP_TRUSTSTORE_PASSWORD_ALIAS_DEFAULT = + "component.truststore.credential.alias"; + + /** + * Python specific + */ + String PYTHONPATH = "PYTHONPATH"; + + + /** + * Name of the AM filter to use: {@value} + */ + String AM_FILTER_NAME = + "org.apache.hadoop.yarn.server.webproxy.amfilter.AmFilterInitializer"; + + /** + * Allowed port range. This MUST be set in app_conf/global. + * {@value} + */ + String KEY_ALLOWED_PORT_RANGE = "site.global.slider.allowed.ports"; + + /** + * env var for custom JVM options. + */ + String SLIDER_JVM_OPTS = "SLIDER_JVM_OPTS"; + + String SLIDER_CLASSPATH_EXTRA = "SLIDER_CLASSPATH_EXTRA"; + String YARN_CONTAINER_PATH = "/node/container/"; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderXMLConfKeysForTesting.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderXMLConfKeysForTesting.java new file mode 100644 index 00000000000..61c828e6777 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderXMLConfKeysForTesting.java @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common; + +/** + * Keys shared across tests + */ +public interface SliderXMLConfKeysForTesting { + + String KEY_TEST_THAW_WAIT_TIME = "slider.test.thaw.wait.seconds"; + + int DEFAULT_THAW_WAIT_TIME_SECONDS = 60; + + + String KEY_TEST_FREEZE_WAIT_TIME = "slider.test.freeze.wait.seconds"; + + int DEFAULT_TEST_FREEZE_WAIT_TIME_SECONDS = 60; + + String KEY_TEST_TIMEOUT = "slider.test.timeout.seconds"; + + int DEFAULT_TEST_TIMEOUT_SECONDS = 30 * 60; + + String KEY_ACCUMULO_LAUNCH_TIME = + "slider.test.accumulo.launch.wait.seconds"; + int DEFAULT_ACCUMULO_LAUNCH_TIME_SECONDS = 60 * 3; + + String KEY_ACCUMULO_GO_LIVE_TIME = + "slider.test.accumulo.live.wait.seconds"; + int DEFAULT_ACCUMULO_LIVE_TIME_SECONDS = 90; + + String KEY_TEST_AGENT_ENABLED = "slider.test.agent.enabled"; + String KEY_AGENTTESTS_QUEUE_LABELED_DEFINED = "slider.test.agent.labeled.queue.enabled"; + String KEY_AGENTTESTS_LABELS_RED_BLUE_DEFINED = "slider.test.agent.labels.defined"; + String KEY_AGENTTESTS_AM_FAILURES_ENABLED = "slider.test.agent.am.failures.enabled"; + + int DEFAULT_AGENT_LAUNCH_TIME_SECONDS = 60 * 3; + + String KEY_TEST_AGENT_HOME = "slider.test.agent.home"; + String KEY_TEST_AGENT_TAR = "slider.test.agent.tar"; + + String KEY_TEST_TEARDOWN_KILLALL = "slider.test.teardown.killall"; + boolean DEFAULT_TEARDOWN_KILLALL = true; + + + /** + * Key for amount of RAM to request + */ + String KEY_TEST_YARN_RAM_REQUEST = "slider.test.yarn.ram"; + String DEFAULT_YARN_RAM_REQUEST = "192"; + + /** + * security related keys + */ + String TEST_SECURITY_DIR = "/tmp/work/security"; + + /** + * Local path to AM keytab: {@value} + */ + String KEY_TEST_AM_KEYTAB = "slider.test.am.keytab.local"; + + /** + * Is the test cluster windows? Default is: same as the local system. + * {@value} + */ + String KEY_TEST_WINDOWS_CLUSTER = "slider.test.windows.cluster"; + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java new file mode 100644 index 00000000000..72dd44f7752 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/SliderXmlConfKeys.java @@ -0,0 +1,206 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common; + +import org.apache.hadoop.registry.client.api.RegistryConstants; + +/** + * These are the keys that can be added to conf/slider-client.xml. + */ +public interface SliderXmlConfKeys { + String PREFIX_PROVIDER = "slider.provider"; + /** + * pattern to identify a provider + * {@value} + */ + String KEY_PROVIDER = PREFIX_PROVIDER + ".%s"; + + /** + * conf option set to point to where the config came from + * {@value} + */ + String KEY_TEMPLATE_ORIGIN = "slider.template.origin"; + + /** + * Original name for the default FS. This is still + * expected by applications deployed + */ + String FS_DEFAULT_NAME_CLASSIC = "fs.default.name"; + + /** + * Slider principal + */ + String KEY_KERBEROS_PRINCIPAL = "slider.kerberos.principal"; + + /** + * Name of the property for ACLs for Slider AM. + * {@value} + */ + String KEY_PROTOCOL_ACL = "slider.security.protocol.acl"; + + /** + * Limit on restarts for the AM + * {@value} + */ + String KEY_AM_RESTART_LIMIT = "slider.yarn.restart.limit"; + + /** + * queue name, by default let YARN pick the queue + */ + String KEY_YARN_QUEUE = "slider.yarn.queue"; + String DEFAULT_YARN_QUEUE = null; + + /** + * default priority + */ + String KEY_YARN_QUEUE_PRIORITY = "slider.yarn.queue.priority"; + int DEFAULT_YARN_QUEUE_PRIORITY = 1; + + + /** + * The slider base path: {@value} + * Defaults to HomeDir/.slider + */ + String KEY_SLIDER_BASE_PATH = "slider.base.path"; + + + /** + * Option for the permissions for the cluster directory itself: {@value} + */ + String CLUSTER_DIRECTORY_PERMISSIONS = + "slider.cluster.directory.permissions"; + + /** + * Default value for the permissions :{@value} + */ + String DEFAULT_CLUSTER_DIRECTORY_PERMISSIONS = "750"; + + /** + * + * Option for the permissions for the data directory itself: {@value} + */ + String DATA_DIRECTORY_PERMISSIONS = "slider.data.directory.permissions"; + + /** + * Default value for the data directory permissions: {@value} + */ + String DEFAULT_DATA_DIRECTORY_PERMISSIONS = "750"; + + /** + * + * Use {@link RegistryConstants#KEY_REGISTRY_ZK_ROOT} + * + */ + @Deprecated + String REGISTRY_PATH = "slider.registry.path"; + + /** + * + * @Deprecated use {@link RegistryConstants#KEY_REGISTRY_ZK_QUORUM} + * + */ + @Deprecated + String REGISTRY_ZK_QUORUM = "slider.zookeeper.quorum"; + + + String IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH = + "ipc.client.fallback-to-simple-auth-allowed"; + String HADOOP_HTTP_FILTER_INITIALIZERS = + "hadoop.http.filter.initializers"; + String KEY_KEYSTORE_LOCATION = "ssl.server.keystore.location"; + String KEY_AM_LOGIN_KEYTAB_NAME = "slider.am.login.keytab.name"; + /** Declare that a keytab must be provided */ + String KEY_AM_LOGIN_KEYTAB_REQUIRED = "slider.am.login.keytab.required"; + String KEY_HDFS_KEYTAB_DIR = "slider.hdfs.keytab.dir"; + String KEY_AM_KEYTAB_LOCAL_PATH = "slider.am.keytab.local.path"; + String KEY_KEYTAB_PRINCIPAL = "slider.keytab.principal.name"; + String KEY_SECURITY_ENABLED = "site.global.security_enabled"; + + /** + * Set to disable server-side checks for python, openssl &c. + * This should only be set for testing + */ + String KEY_SLIDER_AM_DEPENDENCY_CHECKS_DISABLED = + "slider.am.dependency.checks.disabled"; + + /** + * The path to the python executable utilized to launch the agent. + */ + String PYTHON_EXECUTABLE_PATH = "agent.python.exec.path"; + + /** + * Flag to enable the insecure AM filter: {@value} + */ + String X_DEV_INSECURE_WS = "slider.feature.ws.insecure"; + + /** + * Flag to indicate the insecure AM filter is enabled by default: {@value}. + */ + boolean X_DEV_INSECURE_DEFAULT = false; + + + /** + * Flag to indicate the insecure AM filter is required for + * complex REST Verbs: {@value}. + * When Slider switches to being Hadoop 2.7+ only, this flag + * can be set to false + */ + boolean X_DEV_INSECURE_REQUIRED = true; + + /** + * + */ + String KEY_IPC_CLIENT_RETRY_POLICY_ENABLED = + "slider.ipc.client.retry.enabled"; + boolean IPC_CLIENT_RETRY_POLICY_ENABLED_DEFAULT = true; + String KEY_IPC_CLIENT_RETRY_POLICY_SPEC = + "slider.ipc.client.retry.policy.spec"; + String IPC_CLIENT_RETRY_POLICY_SPEC_DEFAULT = + "10000,6,60000,10"; //t1,n1,t2,n2,... + + String KEY_AM_LAUNCH_ENV = "slider.am.launch.env"; + + /** + * From {@code DFSConfigKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY} + */ + String DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY = "dfs.namenode.kerberos.principal"; + + String DFS_DATANODE_KERBEROS_PRINCIPAL_KEY = "dfs.datanode.kerberos.principal"; + + //Delegation token related keys + String DFS_NAMENODE_DELEGATION_KEY_UPDATE_INTERVAL_KEY + = "dfs.namenode.delegation.key.update-interval"; + long DFS_NAMENODE_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT = 24 * 60 * 60 * + 1000; // 1 day + String DFS_NAMENODE_DELEGATION_TOKEN_RENEW_INTERVAL_KEY + = "dfs.namenode.delegation.token.renew-interval"; + long DFS_NAMENODE_DELEGATION_TOKEN_RENEW_INTERVAL_DEFAULT = 24 * 60 * 60 * + 1000; // 1 day + String DFS_NAMENODE_DELEGATION_TOKEN_MAX_LIFETIME_KEY + = "dfs.namenode.delegation.token.max-lifetime"; + long DFS_NAMENODE_DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT = 7 * 24 * 60 * 60 * + 1000; // 7 days + String DFS_NAMENODE_DELEGATION_TOKEN_ALWAYS_USE_KEY + = "dfs.namenode.delegation.token.always-use"; // for tests + boolean DFS_NAMENODE_DELEGATION_TOKEN_ALWAYS_USE_DEFAULT = false; + String DFS_NAMENODE_KEYTAB_FILE_KEY = "dfs.namenode.keytab.file"; + String DFS_NAMENODE_DU_RESERVED_KEY = "dfs.namenode.resource.du.reserved"; + + String MAPREDUCE_JOB_CREDENTIALS_BINARY = "mapreduce.job.credentials.binary"; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java new file mode 100644 index 00000000000..e3cb288f7ae --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractActionArgs.java @@ -0,0 +1,178 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import org.apache.hadoop.fs.Path; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.ErrorStrings; +import org.apache.slider.core.exceptions.UsageException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; + +/** + * Base args for all actions + */ +public abstract class AbstractActionArgs extends ArgOps implements Arguments { + protected static final Logger log = + LoggerFactory.getLogger(AbstractActionArgs.class); + + + protected AbstractActionArgs() { + } + + /** + * URI/binding to the filesystem + */ + @Parameter(names = {ARG_FILESYSTEM, ARG_FILESYSTEM_LONG}, + description = "Filesystem Binding") + public String filesystemBinding; + + @Parameter(names = {ARG_BASE_PATH}, + description = "Slider base path on the filesystem", + converter = PathArgumentConverter.class) + public Path basePath; + + /** + * This is the default parameter + */ + @Parameter + public final List parameters = new ArrayList<>(); + + /** + * get the name: relies on arg 1 being the cluster name in all operations + * @return the name argument, null if there is none + */ + public String getClusterName() { + return (parameters.isEmpty()) ? null : parameters.get(0); + } + + /** + -D name=value + + Define an HBase configuration option which overrides any options in + the configuration XML files of the image or in the image configuration + directory. The values will be persisted. + Configuration options are only passed to the cluster when creating or reconfiguring a cluster. + + */ + + @Parameter(names = ARG_DEFINE, arity = 1, description = "Definitions") + public final List definitions = new ArrayList<>(); + + /** + * System properties + */ + @Parameter(names = {ARG_SYSPROP}, arity = 1, + description = "system properties in the form name value" + + " These are set after the JVM is started.") + public final List sysprops = new ArrayList<>(0); + + + @Parameter(names = {ARG_MANAGER_SHORT, ARG_MANAGER}, + description = "Binding (usually hostname:port) of the YARN resource manager") + public String manager; + + + @Parameter(names = ARG_DEBUG, description = "Debug mode") + public boolean debug = false; + + @Parameter(names = {ARG_HELP}, description = "Help", help = true) + public boolean help = false; + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 1; + } + + /** + * Get the name of the action + * @return the action name + */ + public abstract String getActionName() ; + + /** + * Get the max #of params expected + * @return the number of params in the {@link #parameters} field; + */ + public int getMaxParams() { + return getMinParams(); + } + + public void validate() throws BadCommandArgumentsException, UsageException { + + int minArgs = getMinParams(); + int actionArgSize = parameters.size(); + if (minArgs > actionArgSize) { + throw new BadCommandArgumentsException( + ErrorStrings.ERROR_NOT_ENOUGH_ARGUMENTS + getActionName() + + " Expected minimum " + minArgs + " but got " + actionArgSize); + } + int maxArgs = getMaxParams(); + if (maxArgs == -1) { + maxArgs = minArgs; + } + if (actionArgSize > maxArgs) { + String message = String.format("%s for action %s: limit is %d but saw %d: ", + ErrorStrings.ERROR_TOO_MANY_ARGUMENTS, + getActionName(), maxArgs, + actionArgSize); + + log.error(message); + int index = 1; + for (String actionArg : parameters) { + log.error("[{}] \"{}\"", index++, actionArg); + message += " \"" + actionArg + "\" "; + } + throw new BadCommandArgumentsException(message); + } + } + + @Override + public String toString() { + return super.toString() + ": " + getActionName(); + } + + /** + * Override point: + * Flag to indicate that core hadoop API services are needed (HDFS, YARN, etc) + * —and that validation of the client state should take place. + * + * @return a flag to indicate that the core hadoop services will be needed. + */ + public boolean getHadoopServicesRequired() { + return true; + } + + /** + * Flag to disable secure login. + * This MUST only be set if the action is bypassing security or setting + * it itself + * @return true if login at slider client init time is to be skipped + */ + public boolean disableSecureLogin() { + return false; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractArgsDelegate.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractArgsDelegate.java new file mode 100644 index 00000000000..23ba414cea7 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractArgsDelegate.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + + +/** + * Base class for all the delegates + */ +public class AbstractArgsDelegate extends ArgOps implements Arguments { +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java new file mode 100644 index 00000000000..2a5eedc692d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AbstractClusterBuildingActionArgs.java @@ -0,0 +1,217 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.ParametersDelegate; +import com.google.common.annotations.VisibleForTesting; +import org.apache.hadoop.fs.Path; +import org.apache.slider.core.conf.ConfTree; +import org.apache.slider.core.conf.ConfTreeOperations; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.providers.SliderProviderFactory; + +import java.io.File; +import java.util.List; +import java.util.Map; + +/** + * Abstract Action to build things; shares args across build and + * list + */ +public abstract class AbstractClusterBuildingActionArgs extends + AbstractActionArgs { + + /** + * Declare the image configuration directory to use when creating or + * reconfiguring a slider cluster. The path must be on a filesystem visible + * to all nodes in the YARN cluster. Only one configuration directory can + * be specified. + */ + @Parameter(names = ARG_CONFDIR, + description = "Path to cluster configuration directory in HDFS", + converter = PathArgumentConverter.class) + public Path confdir; + + @Parameter(names = ARG_ZKPATH, + description = "Zookeeper path for the application") + public String appZKPath; + + @Parameter(names = ARG_ZKHOSTS, + description = "comma separated list of the Zookeeper hosts") + public String zkhosts; + + /** + * --image path + * the full path to a .tar or .tar.gz path containing an HBase image. + */ + @Parameter(names = ARG_IMAGE, + description = "The full path to a .tar or .tar.gz path containing the application", + converter = PathArgumentConverter.class) + public Path image; + + @Parameter(names = ARG_APP_HOME, + description = "Home directory of a pre-installed application") + public String appHomeDir; + + @Parameter(names = ARG_PROVIDER, + description = "Provider of the specific cluster application") + public String provider = SliderProviderFactory.DEFAULT_CLUSTER_TYPE; + + @Parameter(names = {ARG_PACKAGE}, + description = "URI to a slider package") + public String packageURI; + + @Parameter(names = {ARG_RESOURCES}, + description = "File defining the resources of this instance") + public File resources; + + @Parameter(names = {ARG_TEMPLATE}, + description = "Template application configuration") + public File template; + + @Parameter(names = {ARG_METAINFO}, + description = "Application meta info file") + public File appMetaInfo; + + @Parameter(names = {ARG_METAINFO_JSON}, + description = "Application meta info JSON blob") + public String appMetaInfoJson; + + @Parameter(names = {ARG_APPDEF}, + description = "Application def (folder or a zip package)") + public File appDef; + + @Parameter(names = {ARG_QUEUE}, + description = "Queue to submit the application") + public String queue; + + @ParametersDelegate + public ComponentArgsDelegate componentDelegate = new ComponentArgsDelegate(); + + @ParametersDelegate + public AddonArgsDelegate addonDelegate = new AddonArgsDelegate(); + + + @ParametersDelegate + public AppAndResouceOptionArgsDelegate optionsDelegate = + new AppAndResouceOptionArgsDelegate(); + + + public Map getOptionsMap() throws + BadCommandArgumentsException { + return optionsDelegate.getOptionsMap(); + } + + /** + * Get the role heap mapping (may be empty, but never null) + * @return role heap mapping + * @throws BadCommandArgumentsException parse problem + */ + public Map> getCompOptionMap() throws + BadCommandArgumentsException { + return optionsDelegate.getCompOptionMap(); + } + + + public Map getResourceOptionsMap() throws + BadCommandArgumentsException { + return optionsDelegate.getResourceOptionsMap(); + } + + /** + * Get the role heap mapping (may be empty, but never null) + * @return role heap mapping + * @throws BadCommandArgumentsException parse problem + */ + public Map> getResourceCompOptionMap() throws + BadCommandArgumentsException { + return optionsDelegate.getResourceCompOptionMap(); + } + + @VisibleForTesting + public List getComponentTuples() { + return componentDelegate.getComponentTuples(); + } + + /** + * Get the role mapping (may be empty, but never null) + * @return role mapping + * @throws BadCommandArgumentsException parse problem + */ + public Map getComponentMap() throws + BadCommandArgumentsException { + return componentDelegate.getComponentMap(); + } + + @VisibleForTesting + public List getAddonTuples() { + return addonDelegate.getAddonTuples(); + } + + /** + * Get the list of addons (may be empty, but never null) + */ + public Map getAddonMap() throws + BadCommandArgumentsException { + return addonDelegate.getAddonMap(); + } + + public Path getConfdir() { + return confdir; + } + + public String getAppZKPath() { + return appZKPath; + } + + public String getZKhosts() { + return zkhosts; + } + + public Path getImage() { + return image; + } + + public String getAppHomeDir() { + return appHomeDir; + } + + public String getProvider() { + return provider; + } + + public ConfTree buildAppOptionsConfTree() throws + BadCommandArgumentsException { + return buildConfTree(getOptionsMap()); + } + + public ConfTree buildResourceOptionsConfTree() throws + BadCommandArgumentsException { + return buildConfTree(getResourceOptionsMap()); + } + + protected ConfTree buildConfTree(Map optionsMap) throws + BadCommandArgumentsException { + ConfTree confTree = new ConfTree(); + ConfTreeOperations ops = new ConfTreeOperations(confTree); + confTree.global.putAll(optionsMap); + return confTree; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionAMSuicideArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionAMSuicideArgs.java new file mode 100644 index 00000000000..5b4cfdc8406 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionAMSuicideArgs.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_AM_SUICIDE}, + commandDescription = SliderActions.DESCRIBE_ACTION_AM_SUICIDE) +public class ActionAMSuicideArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_AM_SUICIDE; + } + + @Parameter(names = {ARG_MESSAGE}, + description = "reason for the action") + public String message = ""; + + @Parameter(names = {ARG_EXITCODE}, + description = "exit code") + public int exitcode = 1; + + @Parameter(names = {ARG_WAIT}, + description = "time for AM to wait before exiting") + public int waittime = 1000; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionBuildArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionBuildArgs.java new file mode 100644 index 00000000000..1a182d1414d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionBuildArgs.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_BUILD}, + commandDescription = SliderActions.DESCRIBE_ACTION_BUILD) + +public class ActionBuildArgs extends AbstractClusterBuildingActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_BUILD; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionClientArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionClientArgs.java new file mode 100644 index 00000000000..85d39ead8c0 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionClientArgs.java @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +import java.io.File; + +@Parameters(commandNames = {SliderActions.ACTION_CLIENT}, + commandDescription = SliderActions.DESCRIBE_ACTION_CLIENT) + +public class ActionClientArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_CLIENT; + } + + @Parameter(names = {ARG_INSTALL}, + description = "Install client") + public boolean install; + + @Parameter(names = {ARG_GETCERTSTORE}, + description = "Get a certificate store") + public boolean getCertStore; + + @Parameter(names = {ARG_KEYSTORE}, + description = "Retrieve keystore to specified location") + public File keystore; + + @Parameter(names = {ARG_TRUSTSTORE}, + description = "Retrieve truststore to specified location") + public File truststore; + + @Parameter(names = {ARG_HOSTNAME}, + description = "(Optional) Specify the hostname to use for generation of keystore certificate") + public String hostname; + + @Parameter(names = {ARG_NAME}, + description = "The name of the application") + public String name; + + @Parameter(names = {ARG_PROVIDER}, + description = "The credential provider in which the password is stored") + public String provider; + + @Parameter(names = {ARG_ALIAS}, + description = "The credential provider alias associated with the password") + public String alias; + + @Parameter(names = {ARG_PASSWORD}, + description = "The certificate store password (alternative to " + + "provider/alias; if password is specified, those will be ignored)") + public String password; + + @Parameter(names = {ARG_PACKAGE}, + description = "Path to app package") + public String packageURI; + + @Parameter(names = {ARG_DEST}, + description = "The location where to install the client") + public File installLocation; + + @Parameter(names = {ARG_CONFIG}, + description = "Client configuration") + public File clientConfig; + + /** + * Get the min #of params expected + * + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 1; + } +} \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionCreateArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionCreateArgs.java new file mode 100644 index 00000000000..e70f30ad620 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionCreateArgs.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameters; +import com.beust.jcommander.ParametersDelegate; + +import java.io.File; + +@Parameters(commandNames = {SliderActions.ACTION_CREATE}, + commandDescription = SliderActions.DESCRIBE_ACTION_CREATE) + +public class ActionCreateArgs extends AbstractClusterBuildingActionArgs + implements WaitTimeAccessor, LaunchArgsAccessor { + + @Override + public String getActionName() { + return SliderActions.ACTION_CREATE; + } + + @ParametersDelegate + LaunchArgsDelegate launchArgs = new LaunchArgsDelegate(); + + @Override + public File getOutputFile() { + return launchArgs.getOutputFile(); + } + + @Override + public String getRmAddress() { + return launchArgs.getRmAddress(); + } + + @Override + public int getWaittime() { + return launchArgs.getWaittime(); + } + + @Override + public void setWaittime(int waittime) { + launchArgs.setWaittime(waittime); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDependencyArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDependencyArgs.java new file mode 100644 index 00000000000..87f9f0dca54 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDependencyArgs.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.slider.common.params; + +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.UsageException; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = { SliderActions.ACTION_DEPENDENCY }, + commandDescription = SliderActions.DESCRIBE_ACTION_DEPENDENCY) +public class ActionDependencyArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_DEPENDENCY; + } + + @Parameter(names = { ARG_UPLOAD }, + description = "Upload AM and agent libraries to HDFS for this client") + public boolean upload; + + @Parameter(names = { ARG_OVERWRITE }, + description = "Overwrite current uploaded dependency libs") + public boolean overwrite = false; + + /** + * Get the min #of params expected + * + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 1; + } + + @Override + public void validate() throws BadCommandArgumentsException, UsageException { + super.validate(); + + if (!upload) { + throw new UsageException("Option " + ARG_UPLOAD + " is mandatory"); + } + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDestroyArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDestroyArgs.java new file mode 100644 index 00000000000..4a129ab2421 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDestroyArgs.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_DESTROY}, + commandDescription = SliderActions.DESCRIBE_ACTION_DESTROY) + +public class ActionDestroyArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_DESTROY; + } + + @Parameter(names = {ARG_FORCE}, + description = "force the operation") + public boolean force; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDiagnosticArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDiagnosticArgs.java new file mode 100644 index 00000000000..c8918737280 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionDiagnosticArgs.java @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters( + commandNames = {SliderActions.ACTION_DIAGNOSTICS}, + commandDescription = SliderActions.DESCRIBE_ACTION_DIAGNOSTIC) +public class ActionDiagnosticArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_DIAGNOSTICS; + } + + @Parameter(names = {ARG_NAME}, + description = "the name of the running application") + public String name; + + @Parameter(names = {ARG_CLIENT}, + description = "print configuration of the slider client") + public boolean client = false; + + @Parameter(names = {ARG_APPLICATION}, + description = "print configuration of the running application") + public boolean application; + + @Parameter(names = {ARG_VERBOSE}, + description = "print out information in details") + public boolean verbose = false; + + @Parameter(names = {ARG_YARN}, + description = "print configuration of the YARN cluster") + public boolean yarn = false; + + @Parameter(names = {ARG_CREDENTIALS}, + description = "print credentials of the current user") + public boolean credentials = false; + + @Parameter(names = {ARG_ALL}, + description = "print all of the information above") + public boolean all; + + @Parameter(names = {ARG_LEVEL}, + description = "diagnose each slider configuration one by one") + public boolean level; + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + @Override + public int getMinParams() { + return 0; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionEchoArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionEchoArgs.java new file mode 100644 index 00000000000..d05f10b06c3 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionEchoArgs.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; + +public class ActionEchoArgs extends AbstractActionArgs { + @Override + public String getActionName() { + return SliderActions.ACTION_ECHO; + } + + @Parameter(names = {ARG_MESSAGE}, + description = "message to echo") + public String message; + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionExistsArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionExistsArgs.java new file mode 100644 index 00000000000..dd1c04bb340 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionExistsArgs.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +import java.io.File; + +@Parameters(commandNames = {SliderActions.ACTION_EXISTS}, + commandDescription = SliderActions.DESCRIBE_ACTION_EXISTS) + +public class ActionExistsArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_EXISTS; + } + + @Parameter(names = {ARG_LIVE}, + description = "verify that the application is running") + public boolean live; + + @Parameter(names = {ARG_STATE}, + description = "verify that the application is in the specific YARN state") + public String state = ""; + + @Parameter(names = {ARG_OUTPUT, ARG_OUTPUT_SHORT}, + description = "output file for any application report") + public File out; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionFlexArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionFlexArgs.java new file mode 100644 index 00000000000..725973e0468 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionFlexArgs.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameters; +import com.beust.jcommander.ParametersDelegate; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; + +import java.util.List; +import java.util.Map; + +@Parameters(commandNames = {SliderActions.ACTION_FLEX}, + commandDescription = SliderActions.DESCRIBE_ACTION_FLEX) + +public class ActionFlexArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_FLEX; + } + + @ParametersDelegate + public ComponentArgsDelegate componentDelegate = new ComponentArgsDelegate(); + + /** + * Get the component mapping (may be empty, but never null) + * @return mapping + * @throws BadCommandArgumentsException parse problem + */ + public Map getComponentMap() throws BadCommandArgumentsException { + return componentDelegate.getComponentMap(); + } + + public List getComponentTuples() { + return componentDelegate.getComponentTuples(); + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionFreezeArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionFreezeArgs.java new file mode 100644 index 00000000000..e3085d9ba24 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionFreezeArgs.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; +import com.beust.jcommander.ParametersDelegate; + +@Parameters(commandNames = {SliderActions.ACTION_FREEZE}, + commandDescription = SliderActions.DESCRIBE_ACTION_FREEZE) + +public class ActionFreezeArgs extends AbstractActionArgs implements + WaitTimeAccessor { + @Override + public String getActionName() { + return SliderActions.ACTION_FREEZE; + } + + public static final String FREEZE_COMMAND_ISSUED = "stop command issued"; + @ParametersDelegate + public WaitArgsDelegate waitDelegate = new WaitArgsDelegate(); + + @Override + public int getWaittime() { + return waitDelegate.getWaittime(); + } + + @Override + public void setWaittime(int waittime) { + waitDelegate.setWaittime(waittime); + } + + @Parameter(names={ARG_MESSAGE}, + description = "reason for the operation") + public String message = FREEZE_COMMAND_ISSUED; + + @Parameter(names = {ARG_FORCE}, + description = "force the operation") + public boolean force; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionHelpArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionHelpArgs.java new file mode 100644 index 00000000000..62773c4685d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionHelpArgs.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameters; + +/** + * The Help command + */ +@Parameters(commandNames = {SliderActions.ACTION_HELP}, + commandDescription = SliderActions.DESCRIBE_ACTION_HELP) +public class ActionHelpArgs extends AbstractActionArgs { + @Override + public String getActionName() { + return SliderActions.ACTION_HELP; + } + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + @Override + public int getMinParams() { + return 0; + } + + /** + * This action does not need hadoop services + * @return false + */ + @Override + public boolean getHadoopServicesRequired() { + return false; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionInstallKeytabArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionInstallKeytabArgs.java new file mode 100644 index 00000000000..4cfb88956da --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionInstallKeytabArgs.java @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_INSTALL_KEYTAB}, + commandDescription = SliderActions.DESCRIBE_ACTION_INSTALL_KEYTAB) + +public class ActionInstallKeytabArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_INSTALL_KEYTAB; + } + + @Parameter(names = {ARG_KEYTAB}, + description = "Path to keytab on local disk") + public String keytabUri; + + @Parameter(names = {ARG_FOLDER}, + description = "The name of the folder in which to store the keytab") + public String folder; + + @Parameter(names = {ARG_OVERWRITE}, description = "Overwrite existing keytab") + public boolean overwrite = false; + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 3; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionInstallPackageArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionInstallPackageArgs.java new file mode 100644 index 00000000000..646e795122c --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionInstallPackageArgs.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; +import com.beust.jcommander.ParametersDelegate; + +@Parameters(commandNames = {SliderActions.ACTION_INSTALL_PACKAGE}, + commandDescription = SliderActions.DESCRIBE_ACTION_INSTALL_PACKAGE) + +public class ActionInstallPackageArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_INSTALL_PACKAGE; + } + + @Parameter(names = {ARG_PACKAGE}, + description = "Path to app package on local disk") + public String packageURI; + + @Parameter(names = {ARG_NAME}, + description = "The type of the package") + public String name; + + @Parameter(names = {ARG_REPLACE_PKG}, description = "Overwrite existing package") + public boolean replacePkg = false; + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 1; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKDiagArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKDiagArgs.java new file mode 100644 index 00000000000..9fc9d2ee749 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKDiagArgs.java @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; +import org.apache.slider.common.tools.SliderUtils; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.UsageException; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +@Parameters(commandNames = {SliderActions.ACTION_KDIAG}, + commandDescription = SliderActions.DESCRIBE_ACTION_KDIAG) + +public class ActionKDiagArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_KDIAG; + } + + @Parameter(names = {ARG_SERVICES}, variableArity = true, + description =" list of services to check") + public List services = new ArrayList<>(); + + @Parameter(names = {ARG_OUTPUT, ARG_OUTPUT_SHORT}, + description = "output file for report") + public File out; + + @Parameter(names = {ARG_KEYTAB}, description = "keytab to use") + public File keytab; + + @Parameter(names = {ARG_KEYLEN}, description = "minimum key length") + public int keylen = 256; + + @Parameter(names = {ARG_PRINCIPAL}, description = "principal to log in from a keytab") + public String principal; + + @Parameter(names = {ARG_SECURE}, description = "Is security required") + public boolean secure = false; + + @Override + public int getMinParams() { + return 0; + } + + @Override + public boolean getHadoopServicesRequired() { + return false; + } + + @Override + public boolean disableSecureLogin() { + return true; + } + + @Override + public void validate() throws BadCommandArgumentsException, UsageException { + super.validate(); + if (keytab != null && SliderUtils.isUnset(principal)) { + throw new UsageException("Missing argument " + ARG_PRINCIPAL); + } + if (keytab == null && SliderUtils.isSet(principal)) { + throw new UsageException("Missing argument " + ARG_KEYTAB); + } + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKeytabArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKeytabArgs.java new file mode 100644 index 00000000000..32b1d2b8382 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKeytabArgs.java @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_KEYTAB}, + commandDescription = SliderActions.DESCRIBE_ACTION_KEYTAB) + +public class ActionKeytabArgs extends AbstractActionArgs { + + public ActionKeytabArgs(ActionInstallKeytabArgs installKeytabInfo) { + this.install = true; + this.overwrite = installKeytabInfo.overwrite; + this.keytab = installKeytabInfo.keytabUri; + this.folder = installKeytabInfo.folder; + } + + public ActionKeytabArgs() { + super(); + } + + @Override + public String getActionName() { + return SliderActions.ACTION_INSTALL_KEYTAB; + } + + @Parameter(names = {ARG_KEYTABINSTALL}, + description = "Install the keytab") + public boolean install; + + @Parameter(names = {ARG_KEYTABDELETE}, + description = "Delete the keytab") + public boolean delete; + + @Parameter(names = {ARG_KEYTABLIST}, + description = "List of installed keytabs") + public boolean list; + + @Parameter(names = {ARG_KEYTAB}, + description = "Path or name of the keytab") + public String keytab; + + @Parameter(names = {ARG_FOLDER}, + description = "The name of the folder in which to store the keytab") + public String folder; + + @Parameter(names = {ARG_OVERWRITE}, description = "Overwrite existing keytab") + public boolean overwrite = false; + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 3; + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKillContainerArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKillContainerArgs.java new file mode 100644 index 00000000000..8c18ad806cc --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionKillContainerArgs.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_KILL_CONTAINER}, + commandDescription = SliderActions.DESCRIBE_ACTION_KILL_CONTAINER) + +public class ActionKillContainerArgs extends AbstractActionArgs { + @Override + public String getActionName() { + return SliderActions.ACTION_KILL_CONTAINER; + } + + @Parameter(names = {ARG_ID}, + description = "ID of the container") + public String id; + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionListArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionListArgs.java new file mode 100644 index 00000000000..739b5fcce80 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionListArgs.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import java.util.HashSet; +import java.util.Set; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_LIST}, + commandDescription = SliderActions.DESCRIBE_ACTION_LIST) + +public class ActionListArgs extends AbstractActionArgs { + @Override + public String getActionName() { + return SliderActions.ACTION_LIST; + } + + @Parameter(names = {ARG_LIVE}, + description = "List only live application instances") + public boolean live; + + @Parameter(names = {ARG_STATE}, + description = "list only applications in the specific YARN state") + public String state = ""; + + @Parameter(names = {ARG_VERBOSE}, + description = "print out information in details") + public boolean verbose = false; + + @Parameter(names = {ARG_CONTAINERS}, + description = "List containers of an application instance") + public boolean containers; + + @Parameter(names = {ARG_VERSION}, + description = "Filter containers by app version (used with " + + ARG_CONTAINERS + ")") + public String version; + + @Parameter(names = {ARG_COMPONENTS}, variableArity = true, + description = "Filter containers by component names (used with " + + ARG_CONTAINERS + ")") + public Set components = new HashSet<>(0); + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 1; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionLookupArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionLookupArgs.java new file mode 100644 index 00000000000..1b73522e880 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionLookupArgs.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; +import org.apache.commons.lang.StringUtils; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.UsageException; + +import java.io.File; + +@Parameters(commandNames = {SliderActions.ACTION_LOOKUP}, + commandDescription = SliderActions.DESCRIBE_ACTION_LOOKUP) + +public class ActionLookupArgs extends AbstractActionArgs { + @Override + public String getActionName() { + return SliderActions.ACTION_LOOKUP; + } + + public int getMinParams() { + return 0; + } + public int getMaxParams() { + return 0; + } + + @Parameter(names = {ARG_ID}, + description = "ID of the application") + public String id; + + @Parameter(names = {ARG_OUTPUT, ARG_OUTPUT_SHORT}, + description = "output file for any application report") + public File outputFile; + + @Override + public void validate() throws BadCommandArgumentsException, UsageException { + super.validate(); + if (StringUtils.isEmpty(id)) { + throw new BadCommandArgumentsException("Missing mandatory argument " + + ARG_ID); + } + } + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder(SliderActions.ACTION_LOOKUP); + if (id!=null) { + sb.append(" "); + sb.append(ARG_ID).append(" ").append(id); + } + if (outputFile != null) { + sb.append(" "); + sb.append(ARG_OUTPUT).append(" ").append(outputFile.getAbsolutePath()); + } + return sb.toString(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionNodesArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionNodesArgs.java new file mode 100644 index 00000000000..ec38c807f05 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionNodesArgs.java @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +import java.io.File; + +@Parameters(commandNames = {SliderActions.ACTION_NODES}, + commandDescription = SliderActions.DESCRIBE_ACTION_NODES) +public class ActionNodesArgs extends AbstractActionArgs { + + /** + * Instance for API use; on CLI the name is derived from {@link #getClusterName()}. + */ + public String instance; + + @Override + public String getActionName() { + return SliderActions.ACTION_NODES; + } + + @Parameter(names = {ARG_OUTPUT, ARG_OUTPUT_SHORT}, + description = "Output file for the information") + public File outputFile; + + @Parameter(names = {ARG_LABEL}) + public String label = ""; + + @Parameter(names = {ARG_HEALTHY} ) + public boolean healthy; + + @Override + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 1; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder( + "ActionNodesArgs{"); + sb.append("instance='").append(instance).append('\''); + sb.append(", outputFile=").append(outputFile); + sb.append(", label='").append(label).append('\''); + sb.append(", healthy=").append(healthy); + sb.append('}'); + return sb.toString(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionPackageArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionPackageArgs.java new file mode 100644 index 00000000000..4833934869d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionPackageArgs.java @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_PACKAGE}, + commandDescription = SliderActions.DESCRIBE_ACTION_PACKAGE) + +public class ActionPackageArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_PACKAGE; + } + + @Parameter(names = {ARG_INSTALL}, + description = "Install package in the sub-folder 'package' of the user's Slider base directory") + public boolean install; + + @Parameter(names = {ARG_PKGDELETE}, + description = "Delete package operation") + public boolean delete; + + @Parameter(names = {ARG_PKGLIST}, + description = "List of package(s) installed") + public boolean list; + + @Parameter(names = {ARG_PKGINSTANCES}, + description = "Lists all application instances referring to package") + public boolean instances; + + @Parameter(names = {ARG_PACKAGE}, + description = "Path to app package on local disk") + public String packageURI; + + @Parameter(names = {ARG_NAME}, + description = "Package name") + public String name; + + @Parameter(names = {ARG_VERSION}, description = "Package version") + public String version; + + @Parameter(names = {ARG_REPLACE_PKG}, + description = "Overwrite existing package") + public boolean replacePkg = false; + + @Parameter(names = {ARG_OUTPUT, ARG_OUTPUT_SHORT}, + description = "Output file for package data") + public String out; + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 1; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionRegistryArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionRegistryArgs.java new file mode 100644 index 00000000000..da1b0e5820d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionRegistryArgs.java @@ -0,0 +1,218 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; +import org.apache.slider.common.SliderKeys; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.UsageException; +import org.apache.slider.core.registry.docstore.ConfigFormat; + +import static org.apache.slider.common.params.SliderActions.ACTION_REGISTRY; +import static org.apache.slider.common.params.SliderActions.DESCRIBE_ACTION_REGISTRY; +import java.io.File; + +/** + * Registry actions + * + * --instance {app name}, if a / is in it, refers underneath? + * --dest {destfile} + * --list : list instances of slider service + * --listfiles + */ +@Parameters(commandNames = {ACTION_REGISTRY}, + commandDescription = DESCRIBE_ACTION_REGISTRY) + +public class ActionRegistryArgs extends AbstractActionArgs { + + public static final String USAGE = + "Usage: " + SliderActions.ACTION_REGISTRY + + " (" + + Arguments.ARG_LIST + "|" + + Arguments.ARG_LISTCONF + "|" + + Arguments.ARG_LISTEXP + "|" + + Arguments.ARG_LISTFILES + "|" + + Arguments.ARG_GETCONF + "|" + + Arguments.ARG_GETEXP + "> " + + Arguments.ARG_NAME + " " + + " )" + + "[" + Arguments.ARG_VERBOSE + "] " + + "[" + Arguments.ARG_USER + "] " + + "[" + Arguments.ARG_OUTPUT + " ] " + + "[" + Arguments.ARG_SERVICETYPE + " ] " + + "[" + Arguments.ARG_FORMAT + " ] " + + System.getProperty("line.separator") + + "Arguments.ARG_GETEXP only supports " + Arguments.ARG_FORMAT + " json" + ; + public ActionRegistryArgs() { + } + + public ActionRegistryArgs(String name) { + this.name = name; + } + + @Override + public String getActionName() { + return ACTION_REGISTRY; + } + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + @Override + public int getMinParams() { + return 0; + } + + @Parameter(names = {ARG_LIST}, + description = "list services") + public boolean list; + + @Parameter(names = {ARG_LISTCONF}, + description = "list configurations") + public boolean listConf; + + @Parameter(names = {ARG_GETCONF}, + description = "get configuration") + public String getConf; + + @Parameter(names = {ARG_LISTEXP}, + description = "list exports") + public boolean listExports; + + @Parameter(names = {ARG_GETEXP}, + description = "get export") + public String getExport; + + @Parameter(names = {ARG_LISTFILES}, + description = "list files") + public String listFiles; + + @Parameter(names = {ARG_GETFILES}, + description = "get files") + public String getFiles; + + //--format + @Parameter(names = ARG_FORMAT, + description = "Format for a response: ") + public String format = ConfigFormat.XML.toString() ; + + @Parameter(names = {ARG_OUTPUT, ARG_OUTPUT_SHORT, ARG_DEST}, + description = "Output destination") + public File out; + + @Parameter(names = {ARG_NAME}, + description = "name of an instance") + public String name; + + @Parameter(names = {ARG_SERVICETYPE}, + description = "optional service type") + public String serviceType = SliderKeys.APP_TYPE; + + @Parameter(names = {ARG_VERBOSE}, + description = "verbose output") + public boolean verbose; + + @Parameter(names = {ARG_INTERNAL}, + description = "fetch internal registry entries") + public boolean internal; + + @Parameter(names = {ARG_USER}, + description = "the name of the user whose application is being resolved") + public String user; + + /** + * validate health of all the different operations + * @throws BadCommandArgumentsException + */ + @Override + public void validate() throws BadCommandArgumentsException, UsageException { + super.validate(); + + //verify that at most one of the operations is set + int gets = s(getConf) + s(getFiles) + s(getExport); + int lists = s(list) + s(listConf) + s(listFiles) + s(listExports); + int set = lists + gets; + if (set > 1) { + throw new UsageException(USAGE); + } + + if (out != null && ( set == 0)) { + throw new UsageException("output path" + + " is only supported on 'get' operations: "); + } + if (!list && !is(name)) { + throw new UsageException("Argument " + ARG_NAME + +" missing: "); + + } + } + + private int s(String arg) { + return is(arg) ? 1 : 0; + } + + private boolean is(String arg) { + return arg != null; + } + + private int s(boolean arg) { + return arg ? 1 : 0; + } + + private String ifdef(String arg, boolean val) { + return val ? (arg + " "): ""; + } + + private String ifdef(String arg, String val) { + if (is(val)) { + return arg + " " + val + " "; + } else { + return ""; + } + } + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder(ACTION_REGISTRY); + sb.append(' '); + sb.append(ifdef(ARG_LIST, list)); + sb.append(ifdef(ARG_LISTCONF, listConf)); + sb.append(ifdef(ARG_LISTFILES, listFiles)); + sb.append(ifdef(ARG_GETCONF, getConf)); + sb.append(ifdef(ARG_GETFILES, getFiles)); + + sb.append(ifdef(ARG_NAME, name)); + sb.append(ifdef(ARG_SERVICETYPE, serviceType)); + + + sb.append(ifdef(ARG_VERBOSE, verbose)); + sb.append(ifdef(ARG_INTERNAL, internal)); + + if (out != null) { + sb.append(ifdef(ARG_OUTPUT, out.toString())); + } + sb.append(ifdef(ARG_FORMAT, format)); + + return sb.toString(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionResolveArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionResolveArgs.java new file mode 100644 index 00000000000..2ee075ab2a4 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionResolveArgs.java @@ -0,0 +1,153 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; +import org.apache.commons.lang.StringUtils; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.UsageException; + +import java.io.File; + +import static org.apache.slider.common.params.SliderActions.ACTION_RESOLVE; +import static org.apache.slider.common.params.SliderActions.DESCRIBE_ACTION_REGISTRY; + +/** + * Resolve registry entries + * + * --path {path} + * --out {destfile} + * --verbose + * --list + */ +@Parameters(commandNames = {ACTION_RESOLVE}, + commandDescription = DESCRIBE_ACTION_REGISTRY) +public class ActionResolveArgs extends AbstractActionArgs { + + public static final String USAGE = + "Usage: " + SliderActions.ACTION_RESOLVE + + " " + + ARG_PATH + " " + + "[" + ARG_LIST + "] " + + "[" + ARG_OUTPUT + " ] " + + "[" + ARG_DESTDIR + " ] " + ; + public ActionResolveArgs() { + } + + @Override + public String getActionName() { + return ACTION_RESOLVE; + } + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + @Override + public int getMinParams() { + return 0; + } + + @Parameter(names = {ARG_LIST}, + description = "list services") + public boolean list; + + @Parameter(names = {ARG_PATH}, + description = "resolve a path") + public String path; + + @Parameter(names = {ARG_DESTDIR}, + description = "destination directory for operations") + public File destdir; + + @Parameter(names = {ARG_OUTPUT, ARG_OUTPUT_SHORT}, + description = "dest file") + public File out; + + @Override + public String toString() { + final StringBuilder sb = + new StringBuilder(ACTION_RESOLVE).append(" "); + sb.append(ARG_PATH).append(" ").append(path).append(" "); + if (list) { + sb.append(ARG_LIST).append(" "); + } + if (destdir != null) { + sb.append(ARG_DESTDIR).append(" ").append(destdir).append(" "); + } + if (out != null) { + sb.append(ARG_OUTPUT).append(" ").append(out).append(" "); + } + return sb.toString(); + } + + @Override + public void validate() throws BadCommandArgumentsException, UsageException { + super.validate(); + if (StringUtils.isEmpty(path)) { + throw new BadCommandArgumentsException("Missing mandatory argument " + + ARG_PATH); + } + if (list && out != null) { + throw new BadCommandArgumentsException("Argument " + + ARG_OUTPUT + + " not supported for " + ARG_LIST); + } + if (out != null && destdir != null) { + throw new BadCommandArgumentsException( + ARG_OUTPUT + " and " + ARG_DESTDIR + " cannot be used together" + ); + } + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public boolean isList() { + return list; + } + + public void setList(boolean list) { + this.list = list; + } + + public File getDestdir() { + return destdir; + } + + public void setDestdir(File destdir) { + this.destdir = destdir; + } + + public File getOut() { + return out; + } + + public void setOut(File out) { + this.out = out; + } + +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionResourceArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionResourceArgs.java new file mode 100644 index 00000000000..60fcc874b34 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionResourceArgs.java @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_RESOURCE}, + commandDescription = SliderActions.DESCRIBE_ACTION_RESOURCE) + +public class ActionResourceArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_RESOURCE; + } + + @Parameter(names = {ARG_INSTALL}, + description = "Install the resource(s)") + public boolean install; + + @Parameter(names = {ARG_DELETE}, + description = "Delete the file") + public boolean delete; + + @Parameter(names = {ARG_LIST}, + description = "List of installed files") + public boolean list; + + @Parameter(names = {ARG_RESOURCE}, + description = "Name of the file or directory") + public String resource; + + @Parameter(names = {ARG_DESTDIR}, + description = "The name of the folder in which to store the resources") + public String folder; + + @Parameter(names = {ARG_OVERWRITE}, description = "Overwrite existing resource(s)") + public boolean overwrite = false; + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public int getMaxParams() { + return 3; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionStatusArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionStatusArgs.java new file mode 100644 index 00000000000..00178df8f64 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionStatusArgs.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_STATUS}, + commandDescription = SliderActions.DESCRIBE_ACTION_STATUS) + +public class ActionStatusArgs extends AbstractActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_STATUS; + } + + @Parameter(names = {ARG_OUTPUT, ARG_OUTPUT_SHORT}, + description = "Output file for the status information") + public String output; + + public String getOutput() { + return output; + } + + public void setOutput(String output) { + this.output = output; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionThawArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionThawArgs.java new file mode 100644 index 00000000000..b43a14e5e0d --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionThawArgs.java @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameters; +import com.beust.jcommander.ParametersDelegate; + +import java.io.File; + +@Parameters(commandNames = {SliderActions.ACTION_THAW}, + commandDescription = SliderActions.DESCRIBE_ACTION_THAW) +public class ActionThawArgs extends AbstractActionArgs implements + WaitTimeAccessor, + LaunchArgsAccessor { + + + @Override + public String getActionName() { + return SliderActions.ACTION_THAW; + } + + @Override + public int getWaittime() { + return launchArgs.getWaittime(); + } + + @ParametersDelegate + LaunchArgsDelegate launchArgs = new LaunchArgsDelegate(); + + @Override + public String getRmAddress() { + return launchArgs.getRmAddress(); + } + + @Override + public void setWaittime(int waittime) { + launchArgs.setWaittime(waittime); + } + + + @Override + public File getOutputFile() { + return launchArgs.getOutputFile(); + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionTokensArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionTokensArgs.java new file mode 100644 index 00000000000..9f93c4e8ed3 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionTokensArgs.java @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; +import org.apache.slider.core.exceptions.UsageException; + +import java.io.File; + +@Parameters(commandNames = {SliderActions.ACTION_TOKENS}, + commandDescription = "save tokens to a file or list tokens in a file") +public class ActionTokensArgs extends AbstractActionArgs { + + public static final String DUPLICATE_ARGS = "Only one of " + + ARG_SOURCE + " and " + ARG_OUTPUT + " allowed"; + + public static final String MISSING_KT_PROVIDER = + "Both " + ARG_KEYTAB + " and " + ARG_PRINCIPAL + + " must be provided"; + + @Override + public String getActionName() { + return SliderActions.ACTION_TOKENS; + } + + @Parameter(names = {ARG_OUTPUT}, + description = "File to write") + public File output; + + @Parameter(names = {ARG_SOURCE}, + description = "source file") + public File source; + + @Parameter(names = {ARG_KEYTAB}, description = "keytab to use") + public File keytab; + + @Parameter(names = {ARG_PRINCIPAL}, description = "principal to log in from a keytab") + public String principal=""; + + /** + * Get the min #of params expected + * @return the min number of params in the {@link #parameters} field + */ + public int getMinParams() { + return 0; + } + + @Override + public void validate() throws BadCommandArgumentsException, UsageException { + super.validate(); + if (output != null && source != null) { + throw new BadCommandArgumentsException(DUPLICATE_ARGS); + } + + // this is actually a !xor + if (keytab != null ^ !principal.isEmpty()) { + throw new BadCommandArgumentsException(MISSING_KT_PROVIDER); + } + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionUpdateArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionUpdateArgs.java new file mode 100644 index 00000000000..9d76bd88033 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionUpdateArgs.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameters; + +@Parameters(commandNames = {SliderActions.ACTION_UPDATE}, + commandDescription = SliderActions.DESCRIBE_ACTION_UPDATE) + +public class ActionUpdateArgs extends AbstractClusterBuildingActionArgs { + + @Override + public String getActionName() { + return SliderActions.ACTION_UPDATE; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionUpgradeArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionUpgradeArgs.java new file mode 100644 index 00000000000..6ef51b2040e --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionUpgradeArgs.java @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import com.beust.jcommander.Parameter; +import com.beust.jcommander.Parameters; +import com.beust.jcommander.ParametersDelegate; + +@Parameters(commandNames = { SliderActions.ACTION_UPGRADE }, + commandDescription = SliderActions.DESCRIBE_ACTION_UPGRADE) +public class ActionUpgradeArgs extends AbstractClusterBuildingActionArgs + implements WaitTimeAccessor, LaunchArgsAccessor { + + @Override + public String getActionName() { + return SliderActions.ACTION_UPGRADE; + } + + @ParametersDelegate + LaunchArgsDelegate launchArgs = new LaunchArgsDelegate(); + + @Override + public File getOutputFile() { + return launchArgs.getOutputFile(); + } + + @Override + public String getRmAddress() { + return launchArgs.getRmAddress(); + } + + @Override + public int getWaittime() { + return launchArgs.getWaittime(); + } + + @Override + public void setWaittime(int waittime) { + launchArgs.setWaittime(waittime); + } + + @Parameter(names={ARG_CONTAINERS}, variableArity = true, + description = "stop specific containers") + public List containers = new ArrayList<>(0); + + @Parameter(names={ARG_COMPONENTS}, variableArity = true, + description = "stop all containers of specific components") + public List components = new ArrayList<>(0); + + @Parameter(names = {ARG_FORCE}, + description = "force spec upgrade operation") + public boolean force; +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionVersionArgs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionVersionArgs.java new file mode 100644 index 00000000000..b9d212b50b3 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/ActionVersionArgs.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameters; + +/** + * The version command + */ +@Parameters(commandNames = {SliderActions.ACTION_VERSION}, + commandDescription = SliderActions.DESCRIBE_ACTION_VERSION) +public class ActionVersionArgs extends AbstractActionArgs { + @Override + public String getActionName() { + return SliderActions.ACTION_VERSION; + } + + public int getMinParams() { + return 0; + } + + /** + * This action does not need hadoop services + * @return false + */ + @Override + public boolean getHadoopServicesRequired() { + return false; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AddonArgsDelegate.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AddonArgsDelegate.java new file mode 100644 index 00000000000..3ef8e197854 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AddonArgsDelegate.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AddonArgsDelegate extends AbstractArgsDelegate { + + /** + * This is a listing of addon packages + */ + @Parameter(names = {ARG_ADDON}, + arity = 2, + description = "--addon ", + splitter = DontSplitArguments.class) + public List addonTuples = new ArrayList<>(0); + + + /** + * Get the list of addons (may be empty, but never null) + * + * @return map of named addons + * + * @throws BadCommandArgumentsException parse problem + */ + public Map getAddonMap() throws BadCommandArgumentsException { + return convertTupleListToMap("addon", addonTuples); + } + + public List getAddonTuples() { + return addonTuples; + } +} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AppAndResouceOptionArgsDelegate.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AppAndResouceOptionArgsDelegate.java new file mode 100644 index 00000000000..f1717088fb0 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-slider/hadoop-yarn-slider-core/src/main/java/org/apache/slider/common/params/AppAndResouceOptionArgsDelegate.java @@ -0,0 +1,111 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.slider.common.params; + +import com.beust.jcommander.Parameter; +import org.apache.slider.core.exceptions.BadCommandArgumentsException; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * Delegate for application and resource options + */ +public class AppAndResouceOptionArgsDelegate extends AbstractArgsDelegate { + + + /** + * Options key value + */ + @Parameter(names = {ARG_OPTION, ARG_OPTION_SHORT}, arity = 2, + description = ARG_OPTION + " ", + splitter = DontSplitArguments.class) + public List optionTuples = new ArrayList<>(0); + + + /** + * All the app component option triples + */ + @Parameter(names = {ARG_COMP_OPT, ARG_COMP_OPT_SHORT, ARG_ROLEOPT}, arity = 3, + description = "Component option " + ARG_COMP_OPT + + "