You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/06/12 02:33:49 UTC
[shardingsphere-elastic-job-cloud] branch master updated: Change
license and add checkstyle.xml (#18) (#19)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elastic-job-cloud.git
The following commit(s) were added to refs/heads/master by this push:
new 882b8d4 Change license and add checkstyle.xml (#18) (#19)
882b8d4 is described below
commit 882b8d4c14493269caa3ed4fdcc0375200afb036
Author: Tboy <gu...@immomo.com>
AuthorDate: Fri Jun 12 10:33:41 2020 +0800
Change license and add checkstyle.xml (#18) (#19)
---
.asf.yaml | 17 ++
.travis.yml | 1 +
elastic-job-cloud-common/pom.xml | 19 +-
.../java/io/elasticjob/cloud/api/ElasticJob.java | 12 +-
.../main/java/io/elasticjob/cloud/api/JobType.java | 12 +-
.../io/elasticjob/cloud/api/ShardingContext.java | 12 +-
.../elasticjob/cloud/api/dataflow/DataflowJob.java | 12 +-
.../io/elasticjob/cloud/api/script/ScriptJob.java | 12 +-
.../io/elasticjob/cloud/api/simple/SimpleJob.java | 12 +-
.../cloud/config/JobCoreConfiguration.java | 12 +-
.../cloud/config/JobRootConfiguration.java | 12 +-
.../cloud/config/JobTypeConfiguration.java | 12 +-
.../config/dataflow/DataflowJobConfiguration.java | 12 +-
.../config/script/ScriptJobConfiguration.java | 12 +-
.../config/simple/SimpleJobConfiguration.java | 12 +-
.../io/elasticjob/cloud/context/ExecutionType.java | 12 +-
.../io/elasticjob/cloud/context/TaskContext.java | 12 +-
.../java/io/elasticjob/cloud/event/JobEvent.java | 12 +-
.../io/elasticjob/cloud/event/JobEventBus.java | 12 +-
.../cloud/event/JobEventConfiguration.java | 12 +-
.../elasticjob/cloud/event/JobEventIdentity.java | 12 +-
.../elasticjob/cloud/event/JobEventListener.java | 13 +-
.../JobEventListenerConfigurationException.java | 12 +-
.../elasticjob/cloud/event/rdb/DatabaseType.java | 12 +-
.../cloud/event/rdb/JobEventRdbConfiguration.java | 12 +-
.../cloud/event/rdb/JobEventRdbIdentity.java | 12 +-
.../cloud/event/rdb/JobEventRdbListener.java | 12 +-
.../cloud/event/rdb/JobEventRdbSearch.java | 12 +-
.../cloud/event/rdb/JobEventRdbStorage.java | 12 +-
.../cloud/event/type/JobExecutionEvent.java | 12 +-
.../event/type/JobExecutionEventThrowable.java | 12 +-
.../cloud/event/type/JobStatusTraceEvent.java | 17 ++
.../cloud/exception/AppConfigurationException.java | 12 +-
.../elasticjob/cloud/exception/ExceptionUtil.java | 12 +-
.../cloud/exception/JobConfigurationException.java | 12 +-
.../JobExecutionEnvironmentException.java | 12 +-
.../cloud/exception/JobStatisticException.java | 12 +-
.../cloud/exception/JobSystemException.java | 12 +-
.../cloud/executor/AbstractElasticJobExecutor.java | 14 +-
.../cloud/executor/JobExecutorFactory.java | 12 +-
.../io/elasticjob/cloud/executor/JobFacade.java | 12 +-
.../cloud/executor/ShardingContexts.java | 12 +-
.../executor/handler/ExecutorServiceHandler.java | 14 +-
.../handler/ExecutorServiceHandlerRegistry.java | 12 +-
.../executor/handler/JobExceptionHandler.java | 12 +-
.../cloud/executor/handler/JobProperties.java | 12 +-
.../impl/DefaultExecutorServiceHandler.java | 12 +-
.../handler/impl/DefaultJobExceptionHandler.java | 12 +-
.../cloud/executor/type/DataflowJobExecutor.java | 12 +-
.../cloud/executor/type/ScriptJobExecutor.java | 12 +-
.../cloud/executor/type/SimpleJobExecutor.java | 12 +-
.../cloud/reg/base/CoordinatorRegistryCenter.java | 12 +-
.../cloud/reg/base/ElectionCandidate.java | 12 +-
.../elasticjob/cloud/reg/base/RegistryCenter.java | 12 +-
.../cloud/reg/exception/RegException.java | 12 +-
.../cloud/reg/exception/RegExceptionHandler.java | 12 +-
.../reg/zookeeper/ZookeeperConfiguration.java | 12 +-
.../reg/zookeeper/ZookeeperElectionService.java | 12 +-
.../reg/zookeeper/ZookeeperRegistryCenter.java | 12 +-
.../cloud/statistics/StatisticInterval.java | 12 +-
.../statistics/rdb/StatisticRdbRepository.java | 12 +-
.../type/job/JobExecutionTypeStatistics.java | 12 +-
.../statistics/type/job/JobRegisterStatistics.java | 12 +-
.../statistics/type/job/JobRunningStatistics.java | 12 +-
.../statistics/type/job/JobTypeStatistics.java | 12 +-
.../statistics/type/task/TaskResultStatistics.java | 12 +-
.../type/task/TaskRunningStatistics.java | 12 +-
.../cloud/util/concurrent/BlockUtils.java | 23 +-
.../util/concurrent/ExecutorServiceObject.java | 18 +-
.../cloud/util/config/ShardingItemParameters.java | 12 +-
.../cloud/util/config/ShardingItems.java | 12 +-
.../elasticjob/cloud/util/digest/Encryption.java | 12 +-
.../elasticjob/cloud/util/env/HostException.java | 12 +-
.../java/io/elasticjob/cloud/util/env/IpUtils.java | 12 +-
.../io/elasticjob/cloud/util/env/TimeService.java | 12 +-
.../AbstractJobConfigurationGsonTypeAdapter.java | 18 +-
.../io/elasticjob/cloud/util/json/GsonFactory.java | 12 +-
.../java/io/elasticjob/cloud/AllCoreTests.java | 12 +-
.../java/io/elasticjob/cloud/api/AllApiTests.java | 12 +-
.../elasticjob/cloud/api/ShardingContextTest.java | 33 ++-
.../io/elasticjob/cloud/config/AllConfigTests.java | 12 +-
.../cloud/config/JobCoreConfigurationTest.java | 49 ++--
.../elasticjob/cloud/context/AllContextTests.java | 12 +-
.../elasticjob/cloud/context/TaskContextTest.java | 74 +++---
.../io/elasticjob/cloud/event/AllEventTests.java | 12 +-
.../io/elasticjob/cloud/event/JobEventBusTest.java | 26 +--
.../cloud/event/JobExecutionEventTest.java | 49 ++--
.../cloud/event/fixture/JobEventCaller.java | 17 +-
.../event/fixture/TestJobEventConfiguration.java | 12 +-
.../fixture/TestJobEventFailureConfiguration.java | 12 +-
.../cloud/event/fixture/TestJobEventIdentity.java | 12 +-
.../cloud/event/fixture/TestJobEventListener.java | 17 +-
.../event/rdb/JobEventRdbConfigurationTest.java | 23 +-
.../cloud/event/rdb/JobEventRdbIdentityTest.java | 19 +-
.../cloud/event/rdb/JobEventRdbListenerTest.java | 14 +-
.../cloud/event/rdb/JobEventRdbSearchTest.java | 14 +-
.../cloud/event/rdb/JobEventRdbStorageTest.java | 69 +++---
.../cloud/exception/AllExceptionTests.java | 12 +-
.../cloud/exception/ExceptionUtilTest.java | 24 +-
.../exception/JobConfigurationExceptionTest.java | 23 +-
.../JobExecutionEnvironmentExceptionTest.java | 19 +-
.../cloud/exception/JobStatisticExceptionTest.java | 12 +-
.../cloud/exception/JobSystemExceptionTest.java | 23 +-
.../cloud/executor/AllExecutorTests.java | 12 +-
.../cloud/executor/JobExecutorFactoryTest.java | 36 ++-
.../ExecutorServiceHandlerRegistryTest.java | 29 ++-
.../cloud/executor/handler/JobPropertiesTest.java | 37 ++-
.../impl/DefaultJobExceptionHandlerTest.java | 12 +-
.../executor/type/DataflowJobExecutorTest.java | 12 +-
.../cloud/executor/type/ElasticJobVerify.java | 12 +-
.../cloud/executor/type/ScriptJobExecutorTest.java | 12 +-
.../cloud/executor/type/SimpleJobExecutorTest.java | 12 +-
.../cloud/executor/type/WrongJobExecutorTest.java | 12 +-
.../elasticjob/cloud/fixture/APIJsonConstants.java | 40 +++-
.../cloud/fixture/EmbedTestingServer.java | 23 +-
.../cloud/fixture/ShardingContextsBuilder.java | 24 +-
.../config/TestDataflowJobConfiguration.java | 12 +-
.../fixture/config/TestJobRootConfiguration.java | 12 +-
.../fixture/config/TestScriptJobConfiguration.java | 12 +-
.../fixture/config/TestSimpleJobConfiguration.java | 12 +-
.../elasticjob/cloud/fixture/context/TaskNode.java | 24 +-
.../fixture/handler/IgnoreJobExceptionHandler.java | 12 +-
.../fixture/handler/ThrowJobExceptionHandler.java | 12 +-
.../io/elasticjob/cloud/fixture/job/JobCaller.java | 30 ++-
.../io/elasticjob/cloud/fixture/job/OtherJob.java | 12 +-
.../cloud/fixture/job/TestDataflowJob.java | 12 +-
.../cloud/fixture/job/TestSimpleJob.java | 12 +-
.../elasticjob/cloud/fixture/job/TestWrongJob.java | 12 +-
.../java/io/elasticjob/cloud/reg/AllRegTests.java | 12 +-
.../reg/exception/RegExceptionHandlerTest.java | 12 +-
.../reg/zookeeper/ZookeeperConfigurationTest.java | 27 ++-
.../zookeeper/ZookeeperElectionServiceTest.java | 17 ++
.../ZookeeperRegistryCenterForAuthTest.java | 12 +-
.../ZookeeperRegistryCenterInitFailureTest.java | 12 +-
.../ZookeeperRegistryCenterMiscellaneousTest.java | 12 +-
.../ZookeeperRegistryCenterModifyTest.java | 15 +-
.../ZookeeperRegistryCenterQueryWithCacheTest.java | 12 +-
...okeeperRegistryCenterQueryWithoutCacheTest.java | 53 ++---
.../util/ZookeeperRegistryCenterTestUtil.java | 23 +-
.../cloud/statistics/AllStatisticsTests.java | 12 +-
.../statistics/rdb/StatisticRdbRepositoryTest.java | 99 ++++----
.../io/elasticjob/cloud/util/AllUtilTests.java | 12 +-
.../util/concurrent/ExecutorServiceObjectTest.java | 42 ++--
.../util/config/ShardingItemParametersTest.java | 12 +-
.../cloud/util/config/ShardingItemsTest.java | 12 +-
.../cloud/util/digest/EncryptionTest.java | 19 +-
.../cloud/util/env/HostExceptionTest.java | 12 +-
.../io/elasticjob/cloud/util/env/IpUtilsTest.java | 12 +-
.../elasticjob/cloud/util/env/TimeServiceTest.java | 18 +-
.../cloud/util/json/GsonFactoryTest.java | 12 +-
.../json/JobConfigurationGsonTypeAdapterTest.java | 32 ++-
.../src/test/resources/conf/reg/local.properties | 17 ++
.../resources/conf/reg/local_overwrite.properties | 17 ++
.../src/test/resources/logback-test.xml | 17 ++
elastic-job-cloud-executor/pom.xml | 21 +-
.../java/io/elasticjob/cloud/api/JobBootstrap.java | 12 +-
.../elasticjob/cloud/executor/CloudJobFacade.java | 18 +-
.../cloud/executor/DaemonTaskScheduler.java | 15 +-
.../cloud/executor/JobConfigurationContext.java | 12 +-
.../io/elasticjob/cloud/executor/TaskExecutor.java | 12 +-
.../executor/local/LocalCloudJobConfiguration.java | 12 +-
.../cloud/executor/local/LocalTaskExecutor.java | 12 +-
.../cloud/executor/AllCloudExecutorTests.java | 12 +-
.../cloud/executor/CloudJobFacadeTest.java | 12 +-
.../cloud/executor/DaemonTaskSchedulerTest.java | 12 +-
.../executor/JobConfigurationContextTest.java | 33 ++-
.../cloud/executor/TaskExecutorTest.java | 12 +-
.../cloud/executor/TaskExecutorThreadTest.java | 31 ++-
.../elasticjob/cloud/executor/fixture/TestJob.java | 12 +-
.../fixture/TestScriptJobConfiguration.java | 13 +-
.../executor/local/AllLocalExecutorTests.java | 12 +-
.../executor/local/LocalTaskExecutorTest.java | 48 ++--
.../executor/local/fixture/TestDataflowJob.java | 12 +-
.../executor/local/fixture/TestSimpleJob.java | 12 +-
.../src/test/resources/applicationContext.xml | 18 ++
.../src/test/resources/logback-test.xml | 17 ++
elastic-job-cloud-scheduler/pom.xml | 27 ++-
.../elasticjob/cloud/restful/GsonJsonProvider.java | 12 +-
.../elasticjob/cloud/restful/RestfulException.java | 12 +-
.../cloud/restful/RestfulExceptionMapper.java | 12 +-
.../io/elasticjob/cloud/restful/RestfulServer.java | 12 +-
.../io/elasticjob/cloud/scheduler/Bootstrap.java | 12 +-
.../config/app/CloudAppConfiguration.java | 12 +-
.../app/CloudAppConfigurationGsonFactory.java | 51 ++--
.../config/app/CloudAppConfigurationNode.java | 16 +-
.../config/app/CloudAppConfigurationService.java | 12 +-
.../constants/CloudConfigurationConstants.java | 12 +-
.../config/job/CloudJobConfiguration.java | 12 +-
.../job/CloudJobConfigurationGsonFactory.java | 26 ++-
.../config/job/CloudJobConfigurationListener.java | 12 +-
.../config/job/CloudJobConfigurationNode.java | 16 +-
.../config/job/CloudJobConfigurationService.java | 12 +-
.../config/job/CloudJobExecutionType.java | 12 +-
.../cloud/scheduler/context/JobContext.java | 12 +-
.../cloud/scheduler/env/BootstrapEnvironment.java | 12 +-
.../scheduler/env/FrameworkConfiguration.java | 12 +-
.../cloud/scheduler/env/MesosConfiguration.java | 12 +-
.../scheduler/env/RestfulServerConfiguration.java | 12 +-
.../cloud/scheduler/ha/FrameworkIDService.java | 12 +-
.../io/elasticjob/cloud/scheduler/ha/HANode.java | 12 +-
.../scheduler/ha/SchedulerElectionCandidate.java | 12 +-
.../scheduler/mesos/AppConstraintEvaluator.java | 12 +-
.../cloud/scheduler/mesos/FacadeService.java | 13 +-
.../cloud/scheduler/mesos/JobTaskRequest.java | 12 +-
.../cloud/scheduler/mesos/LaunchingTasks.java | 12 +-
.../cloud/scheduler/mesos/LeasesQueue.java | 12 +-
.../cloud/scheduler/mesos/MesosStateService.java | 12 +-
.../cloud/scheduler/mesos/ReconcileService.java | 12 +-
.../cloud/scheduler/mesos/SchedulerEngine.java | 12 +-
.../cloud/scheduler/mesos/SchedulerService.java | 14 +-
.../scheduler/mesos/SupportedExtractionType.java | 12 +-
.../cloud/scheduler/mesos/TaskInfoData.java | 16 +-
.../mesos/TaskLaunchScheduledService.java | 12 +-
.../cloud/scheduler/producer/ProducerManager.java | 12 +-
.../producer/TransientProducerRepository.java | 12 +-
.../producer/TransientProducerScheduler.java | 12 +-
.../scheduler/restful/CloudAppRestfulApi.java | 16 +-
.../scheduler/restful/CloudJobRestfulApi.java | 16 +-
.../restful/CloudOperationRestfulApi.java | 12 +-
.../cloud/scheduler/restful/RestfulService.java | 12 +-
.../cloud/scheduler/state/StateNode.java | 12 +-
.../state/disable/app/DisableAppNode.java | 12 +-
.../state/disable/app/DisableAppService.java | 12 +-
.../state/disable/job/DisableJobNode.java | 12 +-
.../state/disable/job/DisableJobService.java | 12 +-
.../scheduler/state/failover/FailoverNode.java | 12 +-
.../scheduler/state/failover/FailoverService.java | 12 +-
.../scheduler/state/failover/FailoverTaskInfo.java | 12 +-
.../cloud/scheduler/state/ready/ReadyNode.java | 12 +-
.../cloud/scheduler/state/ready/ReadyService.java | 12 +-
.../cloud/scheduler/state/running/RunningNode.java | 12 +-
.../scheduler/state/running/RunningService.java | 12 +-
.../scheduler/statistics/StatisticManager.java | 12 +-
.../scheduler/statistics/StatisticsScheduler.java | 12 +-
.../scheduler/statistics/TaskResultMetaData.java | 12 +-
.../statistics/job/AbstractStatisticJob.java | 12 +-
.../statistics/job/JobRunningStatisticJob.java | 12 +-
.../statistics/job/RegisteredJobStatisticJob.java | 12 +-
.../scheduler/statistics/job/StatisticJob.java | 12 +-
.../statistics/job/TaskResultStatisticJob.java | 12 +-
.../statistics/util/StatisticTimeUtils.java | 12 +-
.../elasticjob/cloud/security/WwwAuthFilter.java | 13 +-
.../src/main/resources/assembly/assembly.xml | 18 ++
.../src/main/resources/conf/auth.properties | 17 ++
.../conf/elastic-job-cloud-scheduler.properties | 17 ++
.../src/main/resources/console/css/common.css | 17 ++
.../main/resources/console/html/app/add_app.html | 17 ++
.../resources/console/html/app/apps_overview.html | 17 ++
.../resources/console/html/app/detail_app.html | 17 ++
.../resources/console/html/app/modify_app.html | 17 ++
.../console/html/history/job_dashboard.html | 17 ++
.../console/html/history/job_exec_details.html | 17 ++
.../console/html/history/job_exec_status.html | 17 ++
.../main/resources/console/html/job/add_job.html | 17 ++
.../resources/console/html/job/detail_job.html | 17 ++
.../resources/console/html/job/job_status.html | 17 ++
.../resources/console/html/job/jobs_overview.html | 17 ++
.../resources/console/html/job/modify_job.html | 17 ++
.../main/resources/console/i18n/message.properties | 16 ++
.../resources/console/i18n/message_en.properties | 17 ++
.../resources/console/i18n/message_zh.properties | 17 ++
.../src/main/resources/console/index.html | 17 ++
.../src/main/resources/console/js/app/add_app.js | 17 ++
.../main/resources/console/js/app/app_common.js | 17 ++
.../main/resources/console/js/app/apps_overview.js | 17 ++
.../main/resources/console/js/app/modify_app.js | 17 ++
.../src/main/resources/console/js/common/common.js | 17 ++
.../resources/console/js/history/history_common.js | 17 ++
.../resources/console/js/history/job_dashboard.js | 17 ++
.../console/js/history/job_exec_details.js | 17 ++
.../console/js/history/job_exec_status.js | 17 ++
.../src/main/resources/console/js/index.js | 17 ++
.../src/main/resources/console/js/job/add_job.js | 17 ++
.../main/resources/console/js/job/job_common.js | 17 ++
.../main/resources/console/js/job/jobs_overview.js | 17 ++
.../main/resources/console/js/job/modify_job.js | 17 ++
.../BootstrapValidator/js/bootstrapValidator.js | 21 +-
.../js/bootstrapValidator_zh_CN.js | 16 ++
.../src/main/resources/logback.xml | 17 ++
.../test/java/io/elasticjob/cloud/AllTests.java | 12 +-
.../elasticjob/cloud/restful/AllRestfulTests.java | 12 +-
.../cloud/restful/RestfulExceptionTest.java | 19 +-
.../cloud/restful/RestfulServerTest.java | 12 +-
.../elasticjob/cloud/restful/fixture/Caller.java | 24 +-
.../cloud/restful/fixture/TestFilter.java | 12 +-
.../cloud/restful/fixture/TestRestfulApi.java | 19 +-
.../cloud/scheduler/AllCloudSchedulerTests.java | 12 +-
.../cloud/scheduler/config/AllConfigTests.java | 12 +-
.../config/app/AllCloudAppConfigTests.java | 12 +-
.../config/app/CloudAppConfigurationNodeTest.java | 19 +-
.../app/CloudAppConfigurationServiceTest.java | 60 +++--
.../config/job/AllCloudJobConfigTests.java | 12 +-
.../job/CloudJobConfigurationListenerTest.java | 12 +-
.../config/job/CloudJobConfigurationNodeTest.java | 19 +-
.../job/CloudJobConfigurationServiceTest.java | 70 +++---
.../cloud/scheduler/context/AllContextTests.java | 12 +-
.../cloud/scheduler/context/JobContextTest.java | 21 +-
.../cloud/scheduler/env/AllEnvTests.java | 12 +-
.../scheduler/env/BootstrapEnvironmentTest.java | 56 +++--
.../fixture/CloudAppConfigurationBuilder.java | 19 +-
.../scheduler/fixture/CloudAppJsonConstants.java | 19 +-
.../fixture/CloudJobConfigurationBuilder.java | 88 +++++--
.../scheduler/fixture/CloudJsonConstants.java | 45 +++-
.../scheduler/fixture/EmbedTestingServer.java | 23 +-
.../cloud/scheduler/fixture/TaskNode.java | 30 ++-
.../cloud/scheduler/fixture/TestSimpleJob.java | 12 +-
.../elasticjob/cloud/scheduler/ha/AllHATests.java | 12 +-
.../cloud/scheduler/ha/FrameworkIDServiceTest.java | 12 +-
.../cloud/scheduler/mesos/AllMesosTests.java | 12 +-
.../mesos/AppConstraintEvaluatorTest.java | 80 +++----
.../cloud/scheduler/mesos/FacadeServiceTest.java | 136 ++++++-----
.../cloud/scheduler/mesos/JobTaskRequestTest.java | 44 ++--
.../cloud/scheduler/mesos/LaunchingTasksTest.java | 23 +-
.../cloud/scheduler/mesos/LeasesQueueTest.java | 22 +-
.../scheduler/mesos/MesosStateServiceTest.java | 43 ++--
.../scheduler/mesos/ReconcileServiceTest.java | 13 +-
.../cloud/scheduler/mesos/SchedulerEngineTest.java | 162 +++++++------
.../scheduler/mesos/SchedulerServiceTest.java | 12 +-
.../mesos/SupportedExtractionTypeTest.java | 12 +-
.../cloud/scheduler/mesos/TaskInfoDataTest.java | 24 +-
.../mesos/TaskLaunchScheduledServiceTest.java | 14 +-
.../scheduler/mesos/fixture/OfferBuilder.java | 19 +-
.../fixture/master/MesosMasterServerMock.java | 23 +-
.../mesos/fixture/slave/MesosSlaveServerMock.java | 23 +-
.../cloud/scheduler/producer/AllProducerTests.java | 12 +-
.../cloud/scheduler/producer/ProducerJobTest.java | 12 +-
.../scheduler/producer/ProducerManagerTest.java | 19 +-
.../producer/TransientProducerRepositoryTest.java | 12 +-
.../producer/TransientProducerSchedulerTest.java | 15 +-
.../restful/AbstractCloudRestfulApiTest.java | 12 +-
.../cloud/scheduler/restful/AllRestfulTests.java | 12 +-
.../scheduler/restful/CloudAppRestfulApiTest.java | 104 ++++-----
.../scheduler/restful/CloudJobRestfulApiTest.java | 243 ++++++++++---------
.../restful/CloudOperationRestfulApiTest.java | 39 ++--
.../cloud/scheduler/restful/RestfulTestsUtil.java | 39 +++-
.../cloud/scheduler/state/AllStateTests.java | 12 +-
.../state/disable/app/DisableAppNodeTest.java | 19 +-
.../state/disable/app/DisableAppServiceTest.java | 37 ++-
.../state/disable/job/DisableJobNodeTest.java | 19 +-
.../state/disable/job/DisableJobServiceTest.java | 37 ++-
.../scheduler/state/failover/FailoverNodeTest.java | 21 +-
.../state/failover/FailoverServiceTest.java | 176 +++++++-------
.../cloud/scheduler/state/ready/ReadyNodeTest.java | 19 +-
.../scheduler/state/ready/ReadyServiceTest.java | 230 +++++++++---------
.../scheduler/state/running/RunningNodeTest.java | 21 +-
.../state/running/RunningServiceTest.java | 97 ++++----
.../scheduler/statistics/AllStatisticTests.java | 12 +-
.../scheduler/statistics/StatisticManagerTest.java | 114 +++++----
.../statistics/StatisticsSchedulerTest.java | 12 +-
.../statistics/TaskResultMetaDataTest.java | 12 +-
.../statistics/job/BaseStatisticJobTest.java | 12 +-
.../statistics/job/JobRunningStatisticJobTest.java | 70 +++---
.../job/RegisteredJobStatisticJobTest.java | 12 +-
.../statistics/job/TaskResultStatisticJobTest.java | 12 +-
.../scheduler/statistics/job/TestStatisticJob.java | 12 +-
.../statistics/util/StatisticTimeUtilsTest.java | 12 +-
.../src/test/resources/logback-test.xml | 17 ++
pom.xml | 225 ++++++++++--------
src/main/resources/checkstyle.xml | 260 +++++++++++++++++++++
src/main/resources/checkstyle_ci.xml | 238 +++++++++++++++++++
src/main/resources/dd_checks.xml | 151 ------------
src/main/resources/dd_pmd.xml | 107 ---------
362 files changed, 4751 insertions(+), 3551 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index 4f3062b..ab7daf4 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -1,3 +1,20 @@
+#
+# 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.
+#
+
notifications:
commits: notifications@shardingsphere.apache.org
issues: notifications@shardingsphere.apache.org
diff --git a/.travis.yml b/.travis.yml
index 1d72086..42b2420 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
language: java
+dist: trusty
jdk:
- oraclejdk8
#- oraclejdk7
diff --git a/elastic-job-cloud-common/pom.xml b/elastic-job-cloud-common/pom.xml
index 5b6ab99..a2d9737 100644
--- a/elastic-job-cloud-common/pom.xml
+++ b/elastic-job-cloud-common/pom.xml
@@ -1,10 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>elastic-job-cloud</artifactId>
- <groupId>io.elasticjob</groupId>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
<version>3.0.0.M1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/ElasticJob.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/ElasticJob.java
index 0906215..613f20d 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/ElasticJob.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/ElasticJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/JobType.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/JobType.java
index fe9c7ba..3b08da5 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/JobType.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/JobType.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/ShardingContext.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/ShardingContext.java
index 63dacf9..8aa3295 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/ShardingContext.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/ShardingContext.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/dataflow/DataflowJob.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/dataflow/DataflowJob.java
index 008d0a1..4b6924d 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/dataflow/DataflowJob.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/dataflow/DataflowJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api.dataflow;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/script/ScriptJob.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/script/ScriptJob.java
index f221213..cd292ce 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/script/ScriptJob.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/script/ScriptJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api.script;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/simple/SimpleJob.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/simple/SimpleJob.java
index d89d0b4..caf55e4 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/simple/SimpleJob.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/api/simple/SimpleJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api.simple;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobCoreConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobCoreConfiguration.java
index d219cd7..8901769 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobCoreConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobCoreConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.config;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobRootConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobRootConfiguration.java
index 168895f..4b35e36 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobRootConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobRootConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.config;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobTypeConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobTypeConfiguration.java
index 41e8076..35d05e1 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobTypeConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/JobTypeConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.config;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/dataflow/DataflowJobConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/dataflow/DataflowJobConfiguration.java
index 46c06d6..a25c98f 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/dataflow/DataflowJobConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/dataflow/DataflowJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.config.dataflow;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/script/ScriptJobConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/script/ScriptJobConfiguration.java
index 545f187..42c4f44 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/script/ScriptJobConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/script/ScriptJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.config.script;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/simple/SimpleJobConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/simple/SimpleJobConfiguration.java
index ad63a1b..55c4329 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/simple/SimpleJobConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/config/simple/SimpleJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.config.simple;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/context/ExecutionType.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/context/ExecutionType.java
index b564c0b..cb5fda2 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/context/ExecutionType.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/context/ExecutionType.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.context;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/context/TaskContext.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/context/TaskContext.java
index 3394de0..e22c5f4 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/context/TaskContext.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/context/TaskContext.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.context;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEvent.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEvent.java
index df0de56..60b0c9f 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEvent.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEvent.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventBus.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventBus.java
index 398989a..e8f0da6 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventBus.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventBus.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventConfiguration.java
index 9f872c6..5abf49c 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventIdentity.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventIdentity.java
index e897888..2872b57 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventIdentity.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventIdentity.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventListener.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventListener.java
index 7853bf6..030f8ea 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventListener.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventListener.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,12 +13,10 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
-
import com.google.common.eventbus.AllowConcurrentEvents;
import com.google.common.eventbus.Subscribe;
import io.elasticjob.cloud.event.type.JobExecutionEvent;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventListenerConfigurationException.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventListenerConfigurationException.java
index 2aaca24..461222d 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventListenerConfigurationException.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/JobEventListenerConfigurationException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/DatabaseType.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/DatabaseType.java
index aecffab..7e408de 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/DatabaseType.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/DatabaseType.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbConfiguration.java
index 60502d7..62b20bd 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbIdentity.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbIdentity.java
index 02f3c7b..0544cd1 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbIdentity.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbIdentity.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbListener.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbListener.java
index 32d14e7..1e22666 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbListener.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbListener.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbSearch.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbSearch.java
index d7f1637..629e602 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbSearch.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbSearch.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbStorage.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbStorage.java
index 6210f18..e1a16cb 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbStorage.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/rdb/JobEventRdbStorage.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobExecutionEvent.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobExecutionEvent.java
index 5e34dac..4674956 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobExecutionEvent.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobExecutionEvent.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.type;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobExecutionEventThrowable.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobExecutionEventThrowable.java
index c05c2a0..0a9165f 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobExecutionEventThrowable.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobExecutionEventThrowable.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.type;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobStatusTraceEvent.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobStatusTraceEvent.java
index 4a80937..227d07e 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobStatusTraceEvent.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/event/type/JobStatusTraceEvent.java
@@ -1,3 +1,20 @@
+/*
+ * 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 io.elasticjob.cloud.event.type;
import io.elasticjob.cloud.context.ExecutionType;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/AppConfigurationException.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/AppConfigurationException.java
index 85b201c..5807a04 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/AppConfigurationException.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/AppConfigurationException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/ExceptionUtil.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/ExceptionUtil.java
index c044e26..199a3f8 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/ExceptionUtil.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/ExceptionUtil.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobConfigurationException.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobConfigurationException.java
index c49b907..4053e1a 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobConfigurationException.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobConfigurationException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobExecutionEnvironmentException.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobExecutionEnvironmentException.java
index d0f7955..3b93496 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobExecutionEnvironmentException.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobExecutionEnvironmentException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobStatisticException.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobStatisticException.java
index f55f105..955c08a 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobStatisticException.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobStatisticException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobSystemException.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobSystemException.java
index 432fa92..68ccbf8 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobSystemException.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/exception/JobSystemException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/AbstractElasticJobExecutor.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/AbstractElasticJobExecutor.java
index 32d8e6e..81f040d 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/AbstractElasticJobExecutor.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/AbstractElasticJobExecutor.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
@@ -167,7 +167,7 @@ public abstract class AbstractElasticJobExecutor {
Collection<Integer> items = shardingContexts.getShardingItemParameters().keySet();
if (1 == items.size()) {
int item = shardingContexts.getShardingItemParameters().keySet().iterator().next();
- JobExecutionEvent jobExecutionEvent = new JobExecutionEvent(shardingContexts.getTaskId(), jobName, executionSource, item);
+ JobExecutionEvent jobExecutionEvent = new JobExecutionEvent(shardingContexts.getTaskId(), jobName, executionSource, item);
process(shardingContexts, item, jobExecutionEvent);
return;
}
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/JobExecutorFactory.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/JobExecutorFactory.java
index 116ae51..a1962dd 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/JobExecutorFactory.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/JobExecutorFactory.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/JobFacade.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/JobFacade.java
index 081e629..e14a08a 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/JobFacade.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/JobFacade.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/ShardingContexts.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/ShardingContexts.java
index ce72f6b..7cdc520 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/ShardingContexts.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/ShardingContexts.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandler.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandler.java
index 8e15785..f1bb686 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandler.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler;
@@ -35,5 +35,5 @@ public interface ExecutorServiceHandler {
*
* @return 线程池服务对象
*/
- ExecutorService createExecutorService(final String jobName);
+ ExecutorService createExecutorService(String jobName);
}
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistry.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistry.java
index b2549ce..0d5064c 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistry.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistry.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/JobExceptionHandler.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/JobExceptionHandler.java
index f60e1a9..2781e26 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/JobExceptionHandler.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/JobExceptionHandler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/JobProperties.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/JobProperties.java
index fd8bed2..8d8b993 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/JobProperties.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/JobProperties.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/impl/DefaultExecutorServiceHandler.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/impl/DefaultExecutorServiceHandler.java
index 000e934..37ab326 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/impl/DefaultExecutorServiceHandler.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/impl/DefaultExecutorServiceHandler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler.impl;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandler.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandler.java
index 43c56b6..fe1746e 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandler.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler.impl;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/DataflowJobExecutor.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/DataflowJobExecutor.java
index d45ea87..c5661ef 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/DataflowJobExecutor.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/DataflowJobExecutor.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.type;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/ScriptJobExecutor.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/ScriptJobExecutor.java
index 27f177f..c01ce9d 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/ScriptJobExecutor.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/ScriptJobExecutor.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.type;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/SimpleJobExecutor.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/SimpleJobExecutor.java
index cd49601..587773a 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/SimpleJobExecutor.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/executor/type/SimpleJobExecutor.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.type;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/CoordinatorRegistryCenter.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/CoordinatorRegistryCenter.java
index 564e710..cffc211 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/CoordinatorRegistryCenter.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/CoordinatorRegistryCenter.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.base;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/ElectionCandidate.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/ElectionCandidate.java
index 689850a..27cd1d7 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/ElectionCandidate.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/ElectionCandidate.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.base;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/RegistryCenter.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/RegistryCenter.java
index 30492f9..ce4419c 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/RegistryCenter.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/base/RegistryCenter.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.base;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/exception/RegException.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/exception/RegException.java
index 6ee1f41..d6f7ae4 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/exception/RegException.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/exception/RegException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.exception;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/exception/RegExceptionHandler.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/exception/RegExceptionHandler.java
index d8882c0..2d5ec01 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/exception/RegExceptionHandler.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/exception/RegExceptionHandler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.exception;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperConfiguration.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperConfiguration.java
index 20f802b..30a3261 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperConfiguration.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperElectionService.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperElectionService.java
index cbb68b1..a24c7c4 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperElectionService.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperElectionService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenter.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenter.java
index 90d6609..907eae4 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenter.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenter.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/StatisticInterval.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/StatisticInterval.java
index b438ade..aba3c68 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/StatisticInterval.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/StatisticInterval.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/rdb/StatisticRdbRepository.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/rdb/StatisticRdbRepository.java
index e4d1572..0a96ee5 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/rdb/StatisticRdbRepository.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/rdb/StatisticRdbRepository.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics.rdb;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobExecutionTypeStatistics.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobExecutionTypeStatistics.java
index 1cc18a3..c481c6a 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobExecutionTypeStatistics.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobExecutionTypeStatistics.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics.type.job;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobRegisterStatistics.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobRegisterStatistics.java
index c47b445..7a4b271 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobRegisterStatistics.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobRegisterStatistics.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics.type.job;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobRunningStatistics.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobRunningStatistics.java
index fa77b5b..faa3a21 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobRunningStatistics.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobRunningStatistics.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics.type.job;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobTypeStatistics.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobTypeStatistics.java
index f9b5b0f..b249986 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobTypeStatistics.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/job/JobTypeStatistics.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics.type.job;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/task/TaskResultStatistics.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/task/TaskResultStatistics.java
index d151bb1..ab64fa9 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/task/TaskResultStatistics.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/task/TaskResultStatistics.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics.type.task;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/task/TaskRunningStatistics.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/task/TaskRunningStatistics.java
index 2c9de69..ba65767 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/task/TaskRunningStatistics.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/statistics/type/task/TaskRunningStatistics.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics.type.task;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/concurrent/BlockUtils.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/concurrent/BlockUtils.java
index 66096f4..8195b1d 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/concurrent/BlockUtils.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/concurrent/BlockUtils.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.concurrent;
@@ -22,11 +22,18 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class BlockUtils {
-
+
+ /**
+ * Wait for short time.
+ */
public static void waitingShortTime() {
sleep(100L);
}
-
+
+ /**
+ * Sleep for millis.
+ * @param millis the time for sleep
+ */
public static void sleep(final long millis) {
try {
Thread.sleep(millis);
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/concurrent/ExecutorServiceObject.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/concurrent/ExecutorServiceObject.java
index e8c2417..bbd164c 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/concurrent/ExecutorServiceObject.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/concurrent/ExecutorServiceObject.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.concurrent;
@@ -53,7 +53,11 @@ public final class ExecutorServiceObject {
public ExecutorService createExecutorService() {
return MoreExecutors.listeningDecorator(MoreExecutors.getExitingExecutorService(threadPoolExecutor));
}
-
+
+ /**
+ * Check the executor is shutdown.
+ * @return if true, the executor is shutdown,otherwise not.
+ */
public boolean isShutdown() {
return threadPoolExecutor.isShutdown();
}
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/config/ShardingItemParameters.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/config/ShardingItemParameters.java
index 7fef4a5..1aab706 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/config/ShardingItemParameters.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/config/ShardingItemParameters.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.config;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/config/ShardingItems.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/config/ShardingItems.java
index 86bbe4d..5b6b1b7 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/config/ShardingItems.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/config/ShardingItems.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.config;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/digest/Encryption.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/digest/Encryption.java
index 4701518..808e504 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/digest/Encryption.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/digest/Encryption.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.digest;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/HostException.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/HostException.java
index 48168c9..917806d 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/HostException.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/HostException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.env;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/IpUtils.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/IpUtils.java
index 3552182..c5776af 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/IpUtils.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/IpUtils.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.env;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/TimeService.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/TimeService.java
index d3aebaa..36f3ff8 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/TimeService.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/env/TimeService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.env;
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/json/AbstractJobConfigurationGsonTypeAdapter.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/json/AbstractJobConfigurationGsonTypeAdapter.java
index 520c71f..b625160 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/json/AbstractJobConfigurationGsonTypeAdapter.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/json/AbstractJobConfigurationGsonTypeAdapter.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.json;
@@ -135,7 +135,7 @@ public abstract class AbstractJobConfigurationGsonTypeAdapter<T extends JobRootC
return result;
}
- protected abstract void addToCustomizedValueMap(final String jsonName, final JsonReader in, final Map<String, Object> customizedValueMap) throws IOException;
+ protected abstract void addToCustomizedValueMap(String jsonName, JsonReader in, Map<String, Object> customizedValueMap) throws IOException;
private JobCoreConfiguration getJobCoreConfiguration(final String jobName, final String cron, final int shardingTotalCount,
final String shardingItemParameters, final String jobParameter, final boolean failover,
@@ -165,7 +165,7 @@ public abstract class AbstractJobConfigurationGsonTypeAdapter<T extends JobRootC
}
}
- protected abstract T getJobRootConfiguration(final JobTypeConfiguration typeConfig, final Map<String, Object> customizedValueMap);
+ protected abstract T getJobRootConfiguration(JobTypeConfiguration typeConfig, Map<String, Object> customizedValueMap);
@Override
public void write(final JsonWriter out, final T value) throws IOException {
@@ -192,5 +192,5 @@ public abstract class AbstractJobConfigurationGsonTypeAdapter<T extends JobRootC
out.endObject();
}
- protected abstract void writeCustomized(final JsonWriter out, final T value) throws IOException;
+ protected abstract void writeCustomized(JsonWriter out, T value) throws IOException;
}
diff --git a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/json/GsonFactory.java b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/json/GsonFactory.java
index ada7d36..ef11b0c 100644
--- a/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/json/GsonFactory.java
+++ b/elastic-job-cloud-common/src/main/java/io/elasticjob/cloud/util/json/GsonFactory.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.json;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/AllCoreTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/AllCoreTests.java
index 5e03817..f9e17d9 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/AllCoreTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/AllCoreTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/api/AllApiTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/api/AllApiTests.java
index 07ec020..9c6a14e 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/api/AllApiTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/api/AllApiTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/api/ShardingContextTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/api/ShardingContextTest.java
index ee47ab1..427613d 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/api/ShardingContextTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/api/ShardingContextTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,35 +13,33 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api;
import io.elasticjob.cloud.executor.ShardingContexts;
import io.elasticjob.cloud.fixture.ShardingContextsBuilder;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class ShardingContextTest {
@Test
public void assertNew() {
ShardingContexts shardingContexts = ShardingContextsBuilder.getMultipleShardingContexts();
ShardingContext actual = new ShardingContext(shardingContexts, 1);
- assertThat(actual.getJobName(), is(shardingContexts.getJobName()));
- assertThat(actual.getTaskId(), is(shardingContexts.getTaskId()));
- assertThat(actual.getShardingTotalCount(), is(shardingContexts.getShardingTotalCount()));
- assertThat(actual.getJobParameter(), is(shardingContexts.getJobParameter()));
- assertThat(actual.getShardingItem(), is(1));
- assertThat(actual.getShardingParameter(), is(shardingContexts.getShardingItemParameters().get(1)));
+ Assert.assertThat(actual.getJobName(), Is.is(shardingContexts.getJobName()));
+ Assert.assertThat(actual.getTaskId(), Is.is(shardingContexts.getTaskId()));
+ Assert.assertThat(actual.getShardingTotalCount(), Is.is(shardingContexts.getShardingTotalCount()));
+ Assert.assertThat(actual.getJobParameter(), Is.is(shardingContexts.getJobParameter()));
+ Assert.assertThat(actual.getShardingItem(), Is.is(1));
+ Assert.assertThat(actual.getShardingParameter(), Is.is(shardingContexts.getShardingItemParameters().get(1)));
}
@Test
public void assertToString() {
- assertThat(new ShardingContext(ShardingContextsBuilder.getMultipleShardingContexts(), 1).toString(),
- is("ShardingContext(jobName=test_job, taskId=fake_task_id, shardingTotalCount=2, jobParameter=, shardingItem=1, shardingParameter=B)"));
+ Assert.assertThat(new ShardingContext(ShardingContextsBuilder.getMultipleShardingContexts(), 1).toString(),
+ Is.is("ShardingContext(jobName=test_job, taskId=fake_task_id, shardingTotalCount=2, jobParameter=, shardingItem=1, shardingParameter=B)"));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/config/AllConfigTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/config/AllConfigTests.java
index b49ce04..74c31d9 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/config/AllConfigTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/config/AllConfigTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.config;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/config/JobCoreConfigurationTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/config/JobCoreConfigurationTest.java
index 744f54a..f83b096 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/config/JobCoreConfigurationTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/config/JobCoreConfigurationTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.config;
@@ -20,13 +20,10 @@ package io.elasticjob.cloud.config;
import io.elasticjob.cloud.executor.handler.impl.DefaultJobExceptionHandler;
import io.elasticjob.cloud.fixture.handler.IgnoreJobExceptionHandler;
import io.elasticjob.cloud.executor.handler.JobProperties;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
public final class JobCoreConfigurationTest {
@Test
@@ -35,12 +32,12 @@ public final class JobCoreConfigurationTest {
.shardingItemParameters("0=a,1=b,2=c").jobParameter("param").failover(true).misfire(false).description("desc")
.jobProperties("job_exception_handler", IgnoreJobExceptionHandler.class.getName()).build();
assertRequiredProperties(actual);
- assertThat(actual.getShardingItemParameters(), is("0=a,1=b,2=c"));
- assertThat(actual.getJobParameter(), is("param"));
- assertTrue(actual.isFailover());
- assertFalse(actual.isMisfire());
- assertThat(actual.getDescription(), is("desc"));
- assertThat(actual.getJobProperties().get(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER), is(IgnoreJobExceptionHandler.class.getName()));
+ Assert.assertThat(actual.getShardingItemParameters(), Is.is("0=a,1=b,2=c"));
+ Assert.assertThat(actual.getJobParameter(), Is.is("param"));
+ Assert.assertTrue(actual.isFailover());
+ Assert.assertFalse(actual.isMisfire());
+ Assert.assertThat(actual.getDescription(), Is.is("desc"));
+ Assert.assertThat(actual.getJobProperties().get(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER), Is.is(IgnoreJobExceptionHandler.class.getName()));
}
@Test
@@ -59,18 +56,18 @@ public final class JobCoreConfigurationTest {
}
private void assertRequiredProperties(final JobCoreConfiguration actual) {
- assertThat(actual.getJobName(), is("test_job"));
- assertThat(actual.getCron(), is("0/1 * * * * ?"));
- assertThat(actual.getShardingTotalCount(), is(3));
+ Assert.assertThat(actual.getJobName(), Is.is("test_job"));
+ Assert.assertThat(actual.getCron(), Is.is("0/1 * * * * ?"));
+ Assert.assertThat(actual.getShardingTotalCount(), Is.is(3));
}
private void assertDefaultValues(final JobCoreConfiguration actual) {
- assertThat(actual.getShardingItemParameters(), is(""));
- assertThat(actual.getJobParameter(), is(""));
- assertFalse(actual.isFailover());
- assertTrue(actual.isMisfire());
- assertThat(actual.getDescription(), is(""));
- assertThat(actual.getJobProperties().get(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER), is(DefaultJobExceptionHandler.class.getName()));
+ Assert.assertThat(actual.getShardingItemParameters(), Is.is(""));
+ Assert.assertThat(actual.getJobParameter(), Is.is(""));
+ Assert.assertFalse(actual.isFailover());
+ Assert.assertTrue(actual.isMisfire());
+ Assert.assertThat(actual.getDescription(), Is.is(""));
+ Assert.assertThat(actual.getJobProperties().get(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER), Is.is(DefaultJobExceptionHandler.class.getName()));
}
@Test(expected = IllegalArgumentException.class)
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/context/AllContextTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/context/AllContextTests.java
index 76f099f..27a727c 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/context/AllContextTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/context/AllContextTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.context;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/context/TaskContextTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/context/TaskContextTest.java
index 1b0dddc..c727781 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/context/TaskContextTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/context/TaskContextTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.context;
@@ -20,106 +20,102 @@ package io.elasticjob.cloud.context;
import com.google.common.collect.Lists;
import io.elasticjob.cloud.fixture.context.TaskNode;
import org.hamcrest.core.Is;
+import org.hamcrest.core.StringStartsWith;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.core.Is.is;
-import static org.hamcrest.core.StringStartsWith.startsWith;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
public final class TaskContextTest {
@Test
public void assertNew() {
TaskContext actual = new TaskContext("test_job", Lists.newArrayList(0), ExecutionType.READY, "slave-S0");
- assertThat(actual.getMetaInfo().getJobName(), is("test_job"));
- assertThat(actual.getMetaInfo().getShardingItems().get(0), is(0));
- assertThat(actual.getType(), is(ExecutionType.READY));
- assertThat(actual.getSlaveId(), is("slave-S0"));
- assertThat(actual.getId(), startsWith(TaskNode.builder().build().getTaskNodeValue().substring(0, TaskNode.builder().build().getTaskNodeValue().length() - 1)));
+ Assert.assertThat(actual.getMetaInfo().getJobName(), Is.is("test_job"));
+ Assert.assertThat(actual.getMetaInfo().getShardingItems().get(0), Is.is(0));
+ Assert.assertThat(actual.getType(), Is.is(ExecutionType.READY));
+ Assert.assertThat(actual.getSlaveId(), Is.is("slave-S0"));
+ Assert.assertThat(actual.getId(), StringStartsWith.startsWith(TaskNode.builder().build().getTaskNodeValue().substring(0, TaskNode.builder().build().getTaskNodeValue().length() - 1)));
}
@Test
public void assertNewWithoutSlaveId() {
TaskContext actual = new TaskContext("test_job", Lists.newArrayList(0), ExecutionType.READY);
- assertThat(actual.getSlaveId(), is("unassigned-slave"));
+ Assert.assertThat(actual.getSlaveId(), Is.is("unassigned-slave"));
}
@Test
public void assertGetMetaInfo() {
TaskContext actual = new TaskContext("test_job", Lists.newArrayList(0), ExecutionType.READY, "slave-S0");
- assertThat(actual.getMetaInfo().toString(), is("test_job@-@0"));
+ Assert.assertThat(actual.getMetaInfo().toString(), Is.is("test_job@-@0"));
}
@Test
public void assertTaskContextFrom() {
TaskContext actual = TaskContext.from(TaskNode.builder().build().getTaskNodeValue());
- assertThat(actual.getId(), Is.is(TaskNode.builder().build().getTaskNodeValue()));
- assertThat(actual.getMetaInfo().getJobName(), is("test_job"));
- assertThat(actual.getMetaInfo().getShardingItems().get(0), is(0));
- assertThat(actual.getType(), is(ExecutionType.READY));
- assertThat(actual.getSlaveId(), is("slave-S0"));
+ Assert.assertThat(actual.getId(), Is.is(TaskNode.builder().build().getTaskNodeValue()));
+ Assert.assertThat(actual.getMetaInfo().getJobName(), Is.is("test_job"));
+ Assert.assertThat(actual.getMetaInfo().getShardingItems().get(0), Is.is(0));
+ Assert.assertThat(actual.getType(), Is.is(ExecutionType.READY));
+ Assert.assertThat(actual.getSlaveId(), Is.is("slave-S0"));
}
@Test
public void assertMetaInfoFromWithMetaInfo() {
TaskContext.MetaInfo actual = TaskContext.MetaInfo.from("test_job@-@1");
- assertThat(actual.getJobName(), is("test_job"));
- assertThat(actual.getShardingItems().get(0), is(1));
+ Assert.assertThat(actual.getJobName(), Is.is("test_job"));
+ Assert.assertThat(actual.getShardingItems().get(0), Is.is(1));
}
@Test
public void assertMetaInfoFromWithTaskId() {
TaskContext.MetaInfo actual = TaskContext.MetaInfo.from("test_job@-@1@-@READY@-@unassigned-slave@-@0");
- assertThat(actual.getJobName(), is("test_job"));
- assertThat(actual.getShardingItems().get(0), is(1));
+ Assert.assertThat(actual.getJobName(), Is.is("test_job"));
+ Assert.assertThat(actual.getShardingItems().get(0), Is.is(1));
}
@Test
public void assertMetaInfoFromWithMetaInfoWithoutShardingItems() {
TaskContext.MetaInfo actual = TaskContext.MetaInfo.from("test_job@-@");
- assertThat(actual.getJobName(), is("test_job"));
- assertTrue(actual.getShardingItems().isEmpty());
+ Assert.assertThat(actual.getJobName(), Is.is("test_job"));
+ Assert.assertTrue(actual.getShardingItems().isEmpty());
}
@Test
public void assertMetaInfoFromWithTaskIdWithoutShardingItems() {
TaskContext.MetaInfo actual = TaskContext.MetaInfo.from("test_job@-@@-@READY@-@unassigned-slave@-@0");
- assertThat(actual.getJobName(), is("test_job"));
- assertTrue(actual.getShardingItems().isEmpty());
+ Assert.assertThat(actual.getJobName(), Is.is("test_job"));
+ Assert.assertTrue(actual.getShardingItems().isEmpty());
}
@Test
public void assertGetIdForUnassignedSlave() {
- assertThat(TaskContext.getIdForUnassignedSlave("test_job@-@0@-@READY@-@slave-S0@-@0"), is("test_job@-@0@-@READY@-@unassigned-slave@-@0"));
+ Assert.assertThat(TaskContext.getIdForUnassignedSlave("test_job@-@0@-@READY@-@slave-S0@-@0"), Is.is("test_job@-@0@-@READY@-@unassigned-slave@-@0"));
}
@Test
public void assertGetTaskName() {
TaskContext actual = TaskContext.from(TaskNode.builder().build().getTaskNodeValue());
- assertThat(actual.getTaskName(), is("test_job@-@0@-@READY@-@slave-S0"));
+ Assert.assertThat(actual.getTaskName(), Is.is("test_job@-@0@-@READY@-@slave-S0"));
}
@Test
public void assertGetExecutorId() {
TaskContext actual = TaskContext.from(TaskNode.builder().build().getTaskNodeValue());
- assertThat(actual.getExecutorId("app"), is("app@-@slave-S0"));
+ Assert.assertThat(actual.getExecutorId("app"), Is.is("app@-@slave-S0"));
}
@Test
public void assertSetSlaveId() {
TaskContext actual = new TaskContext("test_job", Lists.newArrayList(0), ExecutionType.READY, "slave-S0");
- assertThat(actual.getSlaveId(), is("slave-S0"));
+ Assert.assertThat(actual.getSlaveId(), Is.is("slave-S0"));
actual.setSlaveId("slave-S1");
- assertThat(actual.getSlaveId(), is("slave-S1"));
+ Assert.assertThat(actual.getSlaveId(), Is.is("slave-S1"));
}
@Test
public void assertSetIdle() {
TaskContext actual = new TaskContext("test_job", Lists.newArrayList(0), ExecutionType.READY, "slave-S0");
- assertFalse(actual.isIdle());
+ Assert.assertFalse(actual.isIdle());
actual.setIdle(true);
- assertTrue(actual.isIdle());
+ Assert.assertTrue(actual.isIdle());
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/AllEventTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/AllEventTests.java
index 79fe411..8263d04 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/AllEventTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/AllEventTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/JobEventBusTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/JobEventBusTest.java
index 8bc11cc..a0f8aaa 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/JobEventBusTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/JobEventBusTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
@@ -23,18 +23,16 @@ import io.elasticjob.cloud.event.fixture.TestJobEventConfiguration;
import io.elasticjob.cloud.event.fixture.TestJobEventListener;
import io.elasticjob.cloud.event.type.JobExecutionEvent;
import io.elasticjob.cloud.event.fixture.TestJobEventFailureConfiguration;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentMatchers;
import org.mockito.Mock;
+import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.unitils.util.ReflectionUtils;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
@RunWith(MockitoJUnitRunner.class)
public final class JobEventBusTest {
@@ -60,7 +58,7 @@ public final class JobEventBusTest {
while (!TestJobEventListener.isExecutionEventCalled()) {
Thread.sleep(100L);
}
- verify(jobEventCaller).call();
+ Mockito.verify(jobEventCaller).call();
}
@Test
@@ -69,10 +67,10 @@ public final class JobEventBusTest {
assertIsRegistered(false);
ReflectionUtils.setFieldValue(jobEventBus, "eventBus", eventBus);
jobEventBus.post(new JobExecutionEvent("fake_task_id", "test_event_bus_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0));
- verify(eventBus, times(0)).post(ArgumentMatchers.<JobEvent>any());
+ Mockito.verify(eventBus, Mockito.times(0)).post(ArgumentMatchers.<JobEvent>any());
}
private void assertIsRegistered(final boolean actual) throws NoSuchFieldException {
- assertThat((boolean) ReflectionUtils.getFieldValue(jobEventBus, JobEventBus.class.getDeclaredField("isRegistered")), is(actual));
+ Assert.assertThat((boolean) ReflectionUtils.getFieldValue(jobEventBus, JobEventBus.class.getDeclaredField("isRegistered")), Is.is(actual));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/JobExecutionEventTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/JobExecutionEventTest.java
index e234d3d..e81b5f1 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/JobExecutionEventTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/JobExecutionEventTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,51 +13,45 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event;
import io.elasticjob.cloud.event.type.JobExecutionEvent;
+import org.hamcrest.CoreMatchers;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.CoreMatchers.startsWith;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
public final class JobExecutionEventTest {
@Test
public void assertNewJobExecutionEvent() {
JobExecutionEvent actual = new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
- assertThat(actual.getJobName(), is("test_job"));
- assertThat(actual.getSource(), is(JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER));
- assertThat(actual.getShardingItem(), is(0));
- assertNotNull(actual.getHostname());
- assertNotNull(actual.getStartTime());
- assertNull(actual.getCompleteTime());
- assertFalse(actual.isSuccess());
- assertThat(actual.getFailureCause(), is(""));
+ Assert.assertThat(actual.getJobName(), Is.is("test_job"));
+ Assert.assertThat(actual.getSource(), Is.is(JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER));
+ Assert.assertThat(actual.getShardingItem(), Is.is(0));
+ Assert.assertNotNull(actual.getHostname());
+ Assert.assertNotNull(actual.getStartTime());
+ Assert.assertNull(actual.getCompleteTime());
+ Assert.assertFalse(actual.isSuccess());
+ Assert.assertThat(actual.getFailureCause(), Is.is(""));
}
@Test
public void assertExecutionSuccess() {
JobExecutionEvent startEvent = new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
JobExecutionEvent successEvent = startEvent.executionSuccess();
- assertNotNull(successEvent.getCompleteTime());
- assertTrue(successEvent.isSuccess());
+ Assert.assertNotNull(successEvent.getCompleteTime());
+ Assert.assertTrue(successEvent.isSuccess());
}
@Test
public void assertExecutionFailure() {
JobExecutionEvent startEvent = new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
JobExecutionEvent failureEvent = startEvent.executionFailure(new RuntimeException("failure"));
- assertNotNull(failureEvent.getCompleteTime());
- assertFalse(failureEvent.isSuccess());
- assertThat(failureEvent.getFailureCause(), startsWith("java.lang.RuntimeException: failure"));
+ Assert.assertNotNull(failureEvent.getCompleteTime());
+ Assert.assertFalse(failureEvent.isSuccess());
+ Assert.assertThat(failureEvent.getFailureCause(), CoreMatchers.startsWith("java.lang.RuntimeException: failure"));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/JobEventCaller.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/JobEventCaller.java
index 8b846e6..76bdd9e 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/JobEventCaller.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/JobEventCaller.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,12 +13,14 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.fixture;
public interface JobEventCaller {
-
+
+ /**
+ * Call method.
+ */
void call();
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventConfiguration.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventConfiguration.java
index 3d485f4..22d7e67 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventConfiguration.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.fixture;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventFailureConfiguration.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventFailureConfiguration.java
index 5024124..0c7ef17 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventFailureConfiguration.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventFailureConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.fixture;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventIdentity.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventIdentity.java
index 15738e3..2961e8e 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventIdentity.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventIdentity.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.fixture;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventListener.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventListener.java
index a7dc317..e5219ac 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventListener.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/fixture/TestJobEventListener.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.fixture;
@@ -41,7 +41,10 @@ public final class TestJobEventListener extends TestJobEventIdentity implements
public void listen(final JobStatusTraceEvent jobStatusTraceEvent) {
jobEventCaller.call();
}
-
+
+ /**
+ * Reset the event.
+ */
public static void reset() {
executionEventCalled = false;
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbConfigurationTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbConfigurationTest.java
index 1d04ad9..04137ce 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbConfigurationTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbConfigurationTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,19 +13,17 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
import io.elasticjob.cloud.event.JobEventListenerConfigurationException;
import org.apache.commons.dbcp.BasicDataSource;
+import org.hamcrest.CoreMatchers;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class JobEventRdbConfigurationTest {
@Test
@@ -34,7 +33,7 @@ public final class JobEventRdbConfigurationTest {
dataSource.setUrl("jdbc:h2:mem:job_event_storage");
dataSource.setUsername("sa");
dataSource.setPassword("");
- assertThat((BasicDataSource) (new JobEventRdbConfiguration(dataSource).getDataSource()), is(dataSource));
+ Assert.assertThat((BasicDataSource) (new JobEventRdbConfiguration(dataSource).getDataSource()), Is.is(dataSource));
}
@Test
@@ -44,7 +43,7 @@ public final class JobEventRdbConfigurationTest {
dataSource.setUrl("jdbc:h2:mem:job_event_storage");
dataSource.setUsername("sa");
dataSource.setPassword("");
- assertThat(new JobEventRdbConfiguration(dataSource).createJobEventListener(), instanceOf(JobEventRdbListener.class));
+ Assert.assertThat(new JobEventRdbConfiguration(dataSource).createJobEventListener(), CoreMatchers.instanceOf(JobEventRdbListener.class));
}
@Test(expected = JobEventListenerConfigurationException.class)
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbIdentityTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbIdentityTest.java
index 76b8812..cea80ad 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbIdentityTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbIdentityTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,20 +13,18 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class JobEventRdbIdentityTest {
@Test
public void assertGetIdentity() {
- assertThat(new JobEventRdbIdentity().getIdentity(), is("rdb"));
+ Assert.assertThat(new JobEventRdbIdentity().getIdentity(), Is.is("rdb"));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbListenerTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbListenerTest.java
index d7d066d..1a8417c 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbListenerTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbListenerTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
@@ -72,7 +72,7 @@ public final class JobEventRdbListenerTest {
@Test
public void assertPostJobStatusTraceEvent() {
JobStatusTraceEvent jobStatusTraceEvent = new JobStatusTraceEvent(
- JOB_NAME, "fake_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR, ExecutionType.READY, "0", JobStatusTraceEvent.State.TASK_RUNNING, "message is empty.");
+ JOB_NAME, "fake_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR, ExecutionType.READY, "0", JobStatusTraceEvent.State.TASK_RUNNING, "message is empty.");
jobEventBus.post(jobStatusTraceEvent);
verify(repository, atMost(1)).addJobStatusTraceEvent(jobStatusTraceEvent);
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbSearchTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbSearchTest.java
index bab6943..0defcd5 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbSearchTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbSearchTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
@@ -36,7 +36,7 @@ public class JobEventRdbSearchTest {
private static JobEventRdbStorage storage;
- private static JobEventRdbSearch repository;
+ private static JobEventRdbSearch repository;
@BeforeClass
public static void setUpClass() throws SQLException {
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbStorageTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbStorageTest.java
index 41a7f5b..1a0dec0 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbStorageTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/event/rdb/JobEventRdbStorageTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.event.rdb;
@@ -21,18 +21,15 @@ import io.elasticjob.cloud.context.ExecutionType;
import io.elasticjob.cloud.event.type.JobExecutionEvent;
import io.elasticjob.cloud.event.type.JobStatusTraceEvent;
import org.apache.commons.dbcp.BasicDataSource;
+import org.hamcrest.CoreMatchers;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.sql.SQLException;
import java.util.List;
-import static junit.framework.TestCase.assertFalse;
-import static junit.framework.TestCase.assertTrue;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.startsWith;
-import static org.junit.Assert.assertThat;
-
public class JobEventRdbStorageTest {
private JobEventRdbStorage storage;
@@ -49,12 +46,12 @@ public class JobEventRdbStorageTest {
@Test
public void assertAddJobExecutionEvent() throws SQLException {
- assertTrue(storage.addJobExecutionEvent(new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0)));
+ Assert.assertTrue(storage.addJobExecutionEvent(new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0)));
}
@Test
public void assertAddJobStatusTraceEvent() throws SQLException {
- assertTrue(storage.addJobStatusTraceEvent(new JobStatusTraceEvent("test_job", "fake_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR, ExecutionType.READY, "0",
+ Assert.assertTrue(storage.addJobStatusTraceEvent(new JobStatusTraceEvent("test_job", "fake_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR, ExecutionType.READY, "0",
JobStatusTraceEvent.State.TASK_RUNNING, "message is empty.")));
}
@@ -63,73 +60,73 @@ public class JobEventRdbStorageTest {
JobStatusTraceEvent jobStatusTraceEvent = new JobStatusTraceEvent("test_job", "fake_failover_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR, ExecutionType.FAILOVER, "0",
JobStatusTraceEvent.State.TASK_STAGING, "message is empty.");
jobStatusTraceEvent.setOriginalTaskId("original_fake_failover_task_id");
- assertThat(storage.getJobStatusTraceEvents("fake_failover_task_id").size(), is(0));
+ Assert.assertThat(storage.getJobStatusTraceEvents("fake_failover_task_id").size(), Is.is(0));
storage.addJobStatusTraceEvent(jobStatusTraceEvent);
- assertThat(storage.getJobStatusTraceEvents("fake_failover_task_id").size(), is(1));
+ Assert.assertThat(storage.getJobStatusTraceEvents("fake_failover_task_id").size(), Is.is(1));
}
@Test
public void assertAddJobStatusTraceEventWhenFailoverWithTaskFailedState() throws SQLException {
- JobStatusTraceEvent stagingJobStatusTraceEvent = new JobStatusTraceEvent("test_job", "fake_failed_failover_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR, ExecutionType.FAILOVER, "0",
- JobStatusTraceEvent.State.TASK_STAGING, "message is empty.");
+ JobStatusTraceEvent stagingJobStatusTraceEvent = new JobStatusTraceEvent("test_job", "fake_failed_failover_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR,
+ ExecutionType.FAILOVER, "0", JobStatusTraceEvent.State.TASK_STAGING, "message is empty.");
stagingJobStatusTraceEvent.setOriginalTaskId("original_fake_failed_failover_task_id");
storage.addJobStatusTraceEvent(stagingJobStatusTraceEvent);
- JobStatusTraceEvent failedJobStatusTraceEvent = new JobStatusTraceEvent("test_job", "fake_failed_failover_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR, ExecutionType.FAILOVER, "0",
- JobStatusTraceEvent.State.TASK_FAILED, "message is empty.");
+ JobStatusTraceEvent failedJobStatusTraceEvent = new JobStatusTraceEvent("test_job", "fake_failed_failover_task_id", "fake_slave_id", JobStatusTraceEvent.Source.LITE_EXECUTOR,
+ ExecutionType.FAILOVER, "0", JobStatusTraceEvent.State.TASK_FAILED, "message is empty.");
storage.addJobStatusTraceEvent(failedJobStatusTraceEvent);
List<JobStatusTraceEvent> jobStatusTraceEvents = storage.getJobStatusTraceEvents("fake_failed_failover_task_id");
- assertThat(jobStatusTraceEvents.size(), is(2));
+ Assert.assertThat(jobStatusTraceEvents.size(), Is.is(2));
for (JobStatusTraceEvent jobStatusTraceEvent : jobStatusTraceEvents) {
- assertThat(jobStatusTraceEvent.getOriginalTaskId(), is("original_fake_failed_failover_task_id"));
+ Assert.assertThat(jobStatusTraceEvent.getOriginalTaskId(), Is.is("original_fake_failed_failover_task_id"));
}
}
@Test
public void assertUpdateJobExecutionEventWhenSuccess() throws SQLException {
JobExecutionEvent startEvent = new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
- assertTrue(storage.addJobExecutionEvent(startEvent));
+ Assert.assertTrue(storage.addJobExecutionEvent(startEvent));
JobExecutionEvent successEvent = startEvent.executionSuccess();
- assertTrue(storage.addJobExecutionEvent(successEvent));
+ Assert.assertTrue(storage.addJobExecutionEvent(successEvent));
}
@Test
public void assertUpdateJobExecutionEventWhenFailure() throws SQLException {
JobExecutionEvent startEvent = new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
- assertTrue(storage.addJobExecutionEvent(startEvent));
+ Assert.assertTrue(storage.addJobExecutionEvent(startEvent));
JobExecutionEvent failureEvent = startEvent.executionFailure(new RuntimeException("failure"));
- assertTrue(storage.addJobExecutionEvent(failureEvent));
- assertThat(failureEvent.getFailureCause(), startsWith("java.lang.RuntimeException: failure"));
- assertTrue(null != failureEvent.getCompleteTime());
+ Assert.assertTrue(storage.addJobExecutionEvent(failureEvent));
+ Assert.assertThat(failureEvent.getFailureCause(), CoreMatchers.startsWith("java.lang.RuntimeException: failure"));
+ Assert.assertTrue(null != failureEvent.getCompleteTime());
}
@Test
public void assertUpdateJobExecutionEventWhenSuccessAndConflict() throws SQLException {
JobExecutionEvent startEvent = new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
JobExecutionEvent successEvent = startEvent.executionSuccess();
- assertTrue(storage.addJobExecutionEvent(successEvent));
- assertFalse(storage.addJobExecutionEvent(startEvent));
+ Assert.assertTrue(storage.addJobExecutionEvent(successEvent));
+ Assert.assertFalse(storage.addJobExecutionEvent(startEvent));
}
@Test
public void assertUpdateJobExecutionEventWhenFailureAndConflict() throws SQLException {
JobExecutionEvent startEvent = new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
JobExecutionEvent failureEvent = startEvent.executionFailure(new RuntimeException("failure"));
- assertTrue(storage.addJobExecutionEvent(failureEvent));
- assertThat(failureEvent.getFailureCause(), startsWith("java.lang.RuntimeException: failure"));
- assertFalse(storage.addJobExecutionEvent(startEvent));
+ Assert.assertTrue(storage.addJobExecutionEvent(failureEvent));
+ Assert.assertThat(failureEvent.getFailureCause(), CoreMatchers.startsWith("java.lang.RuntimeException: failure"));
+ Assert.assertFalse(storage.addJobExecutionEvent(startEvent));
}
@Test
public void assertUpdateJobExecutionEventWhenFailureAndMessageExceed() throws SQLException {
JobExecutionEvent startEvent = new JobExecutionEvent("fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0);
- assertTrue(storage.addJobExecutionEvent(startEvent));
+ Assert.assertTrue(storage.addJobExecutionEvent(startEvent));
StringBuilder failureMsg = new StringBuilder();
for (int i = 0; i < 600; i++) {
failureMsg.append(i);
}
JobExecutionEvent failEvent = startEvent.executionFailure(new RuntimeException("failure" + failureMsg.toString()));
- assertTrue(storage.addJobExecutionEvent(failEvent));
- assertThat(failEvent.getFailureCause(), startsWith("java.lang.RuntimeException: failure"));
+ Assert.assertTrue(storage.addJobExecutionEvent(failEvent));
+ Assert.assertThat(failEvent.getFailureCause(), CoreMatchers.startsWith("java.lang.RuntimeException: failure"));
}
@Test
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/AllExceptionTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/AllExceptionTests.java
index 387864b..07e704c 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/AllExceptionTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/AllExceptionTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/ExceptionUtilTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/ExceptionUtilTest.java
index 04c79ad..4d46348 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/ExceptionUtilTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/ExceptionUtilTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,31 +13,28 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static junit.framework.TestCase.assertTrue;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class ExceptionUtilTest {
@Test
public void assertTransformWithError() {
- assertTrue(ExceptionUtil.transform(new Error("Error")).startsWith("java.lang.Error"));
+ Assert.assertTrue(ExceptionUtil.transform(new Error("Error")).startsWith("java.lang.Error"));
}
@Test
public void assertTransformWithException() {
- assertTrue(ExceptionUtil.transform(new Exception("Exception")).startsWith("java.lang.Exception"));
+ Assert.assertTrue(ExceptionUtil.transform(new Exception("Exception")).startsWith("java.lang.Exception"));
}
@Test
public void assertTransformWithNull() {
- assertThat(ExceptionUtil.transform(null), is(""));
+ Assert.assertThat(ExceptionUtil.transform(null), Is.is(""));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobConfigurationExceptionTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobConfigurationExceptionTest.java
index 9c93547..aea216b 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobConfigurationExceptionTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobConfigurationExceptionTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,26 +13,24 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
+import org.hamcrest.CoreMatchers;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class JobConfigurationExceptionTest {
@Test
public void assertGetMessage() {
- assertThat(new JobConfigurationException("message is: '%s'", "test").getMessage(), is("message is: 'test'"));
+ Assert.assertThat(new JobConfigurationException("message is: '%s'", "test").getMessage(), Is.is("message is: 'test'"));
}
@Test
public void assertGetCause() {
- assertThat(new JobConfigurationException(new RuntimeException()).getCause(), instanceOf(RuntimeException.class));
+ Assert.assertThat(new JobConfigurationException(new RuntimeException()).getCause(), CoreMatchers.instanceOf(RuntimeException.class));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobExecutionEnvironmentExceptionTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobExecutionEnvironmentExceptionTest.java
index f908923..62cea11 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobExecutionEnvironmentExceptionTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobExecutionEnvironmentExceptionTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,20 +13,18 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class JobExecutionEnvironmentExceptionTest {
@Test
public void assertGetMessage() {
- assertThat(new JobExecutionEnvironmentException("message is: '%s'", "test").getMessage(), is("message is: 'test'"));
+ Assert.assertThat(new JobExecutionEnvironmentException("message is: '%s'", "test").getMessage(), Is.is("message is: 'test'"));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobStatisticExceptionTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobStatisticExceptionTest.java
index 0b57e6e..ec5062d 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobStatisticExceptionTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobStatisticExceptionTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobSystemExceptionTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobSystemExceptionTest.java
index ca18c0c..a420e69 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobSystemExceptionTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/exception/JobSystemExceptionTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,26 +13,24 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.exception;
+import org.hamcrest.CoreMatchers;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class JobSystemExceptionTest {
@Test
public void assertGetMessage() {
- assertThat(new JobSystemException("message is: '%s'", "test").getMessage(), is("message is: 'test'"));
+ Assert.assertThat(new JobSystemException("message is: '%s'", "test").getMessage(), Is.is("message is: 'test'"));
}
@Test
public void assertGetCause() {
- assertThat(new JobSystemException(new RuntimeException()).getCause(), instanceOf(RuntimeException.class));
+ Assert.assertThat(new JobSystemException(new RuntimeException()).getCause(), CoreMatchers.instanceOf(RuntimeException.class));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/AllExecutorTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/AllExecutorTests.java
index d93362c..038cce3 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/AllExecutorTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/AllExecutorTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/JobExecutorFactoryTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/JobExecutorFactoryTest.java
index b869a2a..232106b 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/JobExecutorFactoryTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/JobExecutorFactoryTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
@@ -28,16 +28,14 @@ import io.elasticjob.cloud.executor.type.SimpleJobExecutor;
import io.elasticjob.cloud.fixture.handler.IgnoreJobExceptionHandler;
import io.elasticjob.cloud.fixture.job.OtherJob;
import io.elasticjob.cloud.fixture.job.TestSimpleJob;
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
+import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
-import static junit.framework.TestCase.assertTrue;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.when;
-
@RunWith(MockitoJUnitRunner.class)
public final class JobExecutorFactoryTest {
@@ -46,20 +44,20 @@ public final class JobExecutorFactoryTest {
@Test
public void assertGetJobExecutorForScriptJob() {
- when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestScriptJobConfiguration("test.sh", IgnoreJobExceptionHandler.class));
- assertThat(JobExecutorFactory.getJobExecutor(null, jobFacade), instanceOf(ScriptJobExecutor.class));
+ Mockito.when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestScriptJobConfiguration("test.sh", IgnoreJobExceptionHandler.class));
+ Assert.assertThat(JobExecutorFactory.getJobExecutor(null, jobFacade), CoreMatchers.instanceOf(ScriptJobExecutor.class));
}
@Test
public void assertGetJobExecutorForSimpleJob() {
- when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestSimpleJobConfiguration());
- assertThat(JobExecutorFactory.getJobExecutor(new TestSimpleJob(null), jobFacade), instanceOf(SimpleJobExecutor.class));
+ Mockito.when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestSimpleJobConfiguration());
+ Assert.assertThat(JobExecutorFactory.getJobExecutor(new TestSimpleJob(null), jobFacade), CoreMatchers.instanceOf(SimpleJobExecutor.class));
}
@Test
public void assertGetJobExecutorForDataflowJob() {
- when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestDataflowJobConfiguration(false));
- assertThat(JobExecutorFactory.getJobExecutor(new TestDataflowJob(null), jobFacade), instanceOf(DataflowJobExecutor.class));
+ Mockito.when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestDataflowJobConfiguration(false));
+ Assert.assertThat(JobExecutorFactory.getJobExecutor(new TestDataflowJob(null), jobFacade), CoreMatchers.instanceOf(DataflowJobExecutor.class));
}
@Test(expected = JobConfigurationException.class)
@@ -69,9 +67,9 @@ public final class JobExecutorFactoryTest {
@Test
public void assertGetJobExecutorTwice() {
- when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestDataflowJobConfiguration(false));
+ Mockito.when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestDataflowJobConfiguration(false));
AbstractElasticJobExecutor executor = JobExecutorFactory.getJobExecutor(new TestSimpleJob(null), jobFacade);
AbstractElasticJobExecutor anotherExecutor = JobExecutorFactory.getJobExecutor(new TestSimpleJob(null), jobFacade);
- assertTrue(executor.hashCode() != anotherExecutor.hashCode());
+ Assert.assertTrue(executor.hashCode() != anotherExecutor.hashCode());
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistryTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistryTest.java
index 37e621e..9e9c782 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistryTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/ExecutorServiceHandlerRegistryTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,14 +13,16 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler;
import io.elasticjob.cloud.executor.handler.impl.DefaultExecutorServiceHandler;
import lombok.RequiredArgsConstructor;
+import org.hamcrest.core.Is;
+import org.hamcrest.core.IsNot;
import org.junit.After;
+import org.junit.Assert;
import org.junit.Test;
import java.util.Set;
@@ -30,10 +33,6 @@ import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import static org.hamcrest.core.Is.is;
-import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
-
public final class ExecutorServiceHandlerRegistryTest {
@After
@@ -45,13 +44,13 @@ public final class ExecutorServiceHandlerRegistryTest {
public void assertRemove() {
ExecutorService actual = ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler());
ExecutorServiceHandlerRegistry.remove("test_job");
- assertThat(actual, not(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler())));
+ Assert.assertThat(actual, IsNot.not(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler())));
}
@Test
public void assertGetExecutorServiceHandlerForSameThread() {
- assertThat(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler()),
- is(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler())));
+ Assert.assertThat(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler()),
+ Is.is(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler())));
}
@Test
@@ -65,8 +64,8 @@ public final class ExecutorServiceHandlerRegistryTest {
executorService.submit(new GetExecutorServiceHandlerTask(barrier, latch, set));
}
latch.await();
- assertThat(set.size(), is(1));
- assertThat(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler()), is(set.iterator().next()));
+ Assert.assertThat(set.size(), Is.is(1));
+ Assert.assertThat(ExecutorServiceHandlerRegistry.getExecutorServiceHandler("test_job", new DefaultExecutorServiceHandler()), Is.is(set.iterator().next()));
}
@RequiredArgsConstructor
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/JobPropertiesTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/JobPropertiesTest.java
index 2834bcb..71c2a27 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/JobPropertiesTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/JobPropertiesTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler;
@@ -21,37 +21,34 @@ import io.elasticjob.cloud.executor.handler.impl.DefaultExecutorServiceHandler;
import io.elasticjob.cloud.executor.handler.impl.DefaultJobExceptionHandler;
import io.elasticjob.cloud.fixture.APIJsonConstants;
import io.elasticjob.cloud.fixture.handler.IgnoreJobExceptionHandler;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
import org.unitils.util.ReflectionUtils;
import java.util.Map;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
public final class JobPropertiesTest {
@Test
public void assertPutInvalidKey() throws NoSuchFieldException {
JobProperties actual = new JobProperties();
actual.put("invalid_key", "");
- assertTrue(getMap(actual).isEmpty());
+ Assert.assertTrue(getMap(actual).isEmpty());
}
@Test
public void assertPutNullValue() throws NoSuchFieldException {
JobProperties actual = new JobProperties();
actual.put(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER.getKey(), null);
- assertTrue(getMap(actual).isEmpty());
+ Assert.assertTrue(getMap(actual).isEmpty());
}
@Test
public void assertPutSuccess() throws NoSuchFieldException {
JobProperties actual = new JobProperties();
actual.put(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER.getKey(), DefaultJobExceptionHandler.class.getCanonicalName());
- assertThat(getMap(actual).size(), is(1));
+ Assert.assertThat(getMap(actual).size(), Is.is(1));
}
private Map getMap(final JobProperties jobProperties) throws NoSuchFieldException {
@@ -61,29 +58,29 @@ public final class JobPropertiesTest {
@Test
public void assertGetWhenValueIsEmpty() throws NoSuchFieldException {
JobProperties actual = new JobProperties();
- assertThat(actual.get(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER), is(DefaultJobExceptionHandler.class.getCanonicalName()));
- assertThat(actual.get(JobProperties.JobPropertiesEnum.EXECUTOR_SERVICE_HANDLER), is(DefaultExecutorServiceHandler.class.getCanonicalName()));
+ Assert.assertThat(actual.get(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER), Is.is(DefaultJobExceptionHandler.class.getCanonicalName()));
+ Assert.assertThat(actual.get(JobProperties.JobPropertiesEnum.EXECUTOR_SERVICE_HANDLER), Is.is(DefaultExecutorServiceHandler.class.getCanonicalName()));
}
@Test
public void assertGetWhenValueIsNotEmpty() throws NoSuchFieldException {
JobProperties actual = new JobProperties();
actual.put(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER.getKey(), IgnoreJobExceptionHandler.class.getCanonicalName());
- assertThat(actual.get(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER), is(IgnoreJobExceptionHandler.class.getCanonicalName()));
+ Assert.assertThat(actual.get(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER), Is.is(IgnoreJobExceptionHandler.class.getCanonicalName()));
}
@Test
public void assertJson() {
- assertThat(new JobProperties().json(), is(APIJsonConstants.getJobPropertiesJson(DefaultJobExceptionHandler.class.getCanonicalName())));
+ Assert.assertThat(new JobProperties().json(), Is.is(APIJsonConstants.getJobPropertiesJson(DefaultJobExceptionHandler.class.getCanonicalName())));
}
@Test
public void assertJobPropertiesEnumFromValidValue() {
- assertThat(JobProperties.JobPropertiesEnum.from(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER.getKey()), is(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER));
+ Assert.assertThat(JobProperties.JobPropertiesEnum.from(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER.getKey()), Is.is(JobProperties.JobPropertiesEnum.JOB_EXCEPTION_HANDLER));
}
@Test
public void assertJobPropertiesEnumFromInvalidValue() {
- assertNull(JobProperties.JobPropertiesEnum.from("invalid"));
+ Assert.assertNull(JobProperties.JobPropertiesEnum.from("invalid"));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandlerTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandlerTest.java
index fcbb718..69c93e5 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandlerTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/handler/impl/DefaultJobExceptionHandlerTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.handler.impl;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/DataflowJobExecutorTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/DataflowJobExecutorTest.java
index 29573db..9039ef8 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/DataflowJobExecutorTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/DataflowJobExecutorTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.type;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/ElasticJobVerify.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/ElasticJobVerify.java
index 16b4157..a68520f 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/ElasticJobVerify.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/ElasticJobVerify.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.type;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/ScriptJobExecutorTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/ScriptJobExecutorTest.java
index 7f2403b..a1a8933 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/ScriptJobExecutorTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/ScriptJobExecutorTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.type;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/SimpleJobExecutorTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/SimpleJobExecutorTest.java
index 13d2b78..9e46a42 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/SimpleJobExecutorTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/SimpleJobExecutorTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.type;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/WrongJobExecutorTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/WrongJobExecutorTest.java
index 52d4889..936e549 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/WrongJobExecutorTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/executor/type/WrongJobExecutorTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.type;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/APIJsonConstants.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/APIJsonConstants.java
index 91ae423..1a635a3 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/APIJsonConstants.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/APIJsonConstants.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture;
@@ -39,19 +39,39 @@ public final class APIJsonConstants {
private static final String SCRIPT_JOB_JSON = "{\"jobName\":\"test_job\",\"jobClass\":\"io.elasticjob.cloud.api.script.ScriptJob\",\"jobType\":\"SCRIPT\",\"cron\":\"0/1 * * * * ?\","
+ "\"shardingTotalCount\":3,\"shardingItemParameters\":\"\",\"jobParameter\":\"\",\"failover\":false,\"misfire\":true,\"description\":\"\","
+ "\"jobProperties\":%s,\"scriptCommandLine\":\"test.sh\"}";
-
+
+ /**
+ * Get job properties in json format.
+ * @param jobExceptionHandler the job exception handler
+ * @return the json string
+ */
public static String getJobPropertiesJson(final String jobExceptionHandler) {
return String.format(JOB_PROPS_JSON, jobExceptionHandler);
}
-
+
+ /**
+ * Get simple job in json format.
+ * @param jobExceptionHandler the job exception handler
+ * @return the json string
+ */
public static String getSimpleJobJson(final String jobExceptionHandler) {
return String.format(SIMPLE_JOB_JSON, getJobPropertiesJson(jobExceptionHandler));
}
-
+
+ /**
+ * Get dataflow job in json format.
+ * @param jobExceptionHandler the job exception handler
+ * @return the json string
+ */
public static String getDataflowJobJson(final String jobExceptionHandler) {
return String.format(DATAFLOW_JOB_JSON, getJobPropertiesJson(jobExceptionHandler));
}
-
+
+ /**
+ * Get script job in json format.
+ * @param jobExceptionHandler the job exception handler
+ * @return the json string
+ */
public static String getScriptJobJson(final String jobExceptionHandler) {
return String.format(SCRIPT_JOB_JSON, getJobPropertiesJson(jobExceptionHandler));
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/EmbedTestingServer.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/EmbedTestingServer.java
index 646f109..da18f50 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/EmbedTestingServer.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/EmbedTestingServer.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture;
@@ -32,11 +32,18 @@ public final class EmbedTestingServer {
private static final int PORT = 3181;
private static volatile TestingServer testingServer;
-
+
+ /**
+ * Get connection url.
+ * @return the connection
+ */
public static String getConnectionString() {
return Joiner.on(":").join("localhost", PORT);
}
-
+
+ /**
+ * Start the embed server.
+ */
public static void start() {
if (null != testingServer) {
return;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/ShardingContextsBuilder.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/ShardingContextsBuilder.java
index dad7100..c06edc2 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/ShardingContextsBuilder.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/ShardingContextsBuilder.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture;
@@ -28,13 +28,21 @@ import java.util.Map;
public final class ShardingContextsBuilder {
public static final String JOB_NAME = "test_job";
-
+
+ /**
+ * Get single sharding contexts.
+ * @return ShardingContexts
+ */
public static ShardingContexts getSingleShardingContexts() {
Map<Integer, String> map = new HashMap<>(1, 1);
map.put(0, "A");
return new ShardingContexts("fake_task_id", JOB_NAME, 1, "", map);
}
-
+
+ /**
+ * Get multi sharding contexts.
+ * @return ShardingContexts
+ */
public static ShardingContexts getMultipleShardingContexts() {
Map<Integer, String> map = new HashMap<>(2, 1);
map.put(0, "A");
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestDataflowJobConfiguration.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestDataflowJobConfiguration.java
index 2d85455..b0b14ba 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestDataflowJobConfiguration.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestDataflowJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.config;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestJobRootConfiguration.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestJobRootConfiguration.java
index 1a18881..c796dd6 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestJobRootConfiguration.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestJobRootConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.config;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestScriptJobConfiguration.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestScriptJobConfiguration.java
index 1b324a2..18f05f3 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestScriptJobConfiguration.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestScriptJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.config;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestSimpleJobConfiguration.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestSimpleJobConfiguration.java
index a9878f5..f934136 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestSimpleJobConfiguration.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/config/TestSimpleJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.config;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/context/TaskNode.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/context/TaskNode.java
index 820b5ee..88e66fe 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/context/TaskNode.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/context/TaskNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.context;
@@ -33,11 +33,19 @@ public final class TaskNode {
private String slaveId;
private String uuid;
-
+
+ /**
+ * Get task node path.
+ * @return task node path
+ */
public String getTaskNodePath() {
return Joiner.on("@-@").join(null == jobName ? "test_job" : jobName, shardingItem);
}
-
+
+ /**
+ * Get task node value.
+ * @return the task node value
+ */
public String getTaskNodeValue() {
return Joiner.on("@-@").join(getTaskNodePath(), null == type ? ExecutionType.READY : type, null == slaveId ? "slave-S0" : slaveId, null == uuid ? "0" : uuid);
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/handler/IgnoreJobExceptionHandler.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/handler/IgnoreJobExceptionHandler.java
index 224d00e..68c2570 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/handler/IgnoreJobExceptionHandler.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/handler/IgnoreJobExceptionHandler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.handler;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/handler/ThrowJobExceptionHandler.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/handler/ThrowJobExceptionHandler.java
index 6bae5c1..a032322 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/handler/ThrowJobExceptionHandler.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/handler/ThrowJobExceptionHandler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.handler;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/JobCaller.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/JobCaller.java
index 217a8a6..0b17d57 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/JobCaller.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/JobCaller.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.job;
@@ -20,10 +20,22 @@ package io.elasticjob.cloud.fixture.job;
import java.util.List;
public interface JobCaller {
-
+
+ /**
+ * Execute the job.
+ */
void execute();
-
+
+ /**
+ * Fetch job data.
+ * @param shardingItem shard item
+ * @return the job data
+ */
List<Object> fetchData(int shardingItem);
-
+
+ /**
+ * Process job data.
+ * @param data the job to process
+ */
void processData(Object data);
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/OtherJob.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/OtherJob.java
index b59ceae..e253fcc 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/OtherJob.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/OtherJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.job;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestDataflowJob.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestDataflowJob.java
index 8e8d97f..1365222 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestDataflowJob.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestDataflowJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.job;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestSimpleJob.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestSimpleJob.java
index 4ecc58e..4e9b10d 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestSimpleJob.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestSimpleJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.job;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestWrongJob.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestWrongJob.java
index a631cf8..0c265a2 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestWrongJob.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/fixture/job/TestWrongJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.fixture.job;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/AllRegTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/AllRegTests.java
index c68a685..8fe1e4b 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/AllRegTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/AllRegTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/exception/RegExceptionHandlerTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/exception/RegExceptionHandlerTest.java
index dec4358..59f39e8 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/exception/RegExceptionHandlerTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/exception/RegExceptionHandlerTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.exception;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperConfigurationTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperConfigurationTest.java
index b756d6f..8dc4764 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperConfigurationTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperConfigurationTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,25 +13,23 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class ZookeeperConfigurationTest {
@Test
public void assertNewZookeeperConfigurationForServerListsAndNamespace() {
ZookeeperConfiguration zkConfig = new ZookeeperConfiguration("localhost:2181", "myNamespace");
- assertThat(zkConfig.getServerLists(), is("localhost:2181"));
- assertThat(zkConfig.getNamespace(), is("myNamespace"));
- assertThat(zkConfig.getBaseSleepTimeMilliseconds(), is(1000));
- assertThat(zkConfig.getMaxSleepTimeMilliseconds(), is(3000));
- assertThat(zkConfig.getMaxRetries(), is(3));
+ Assert.assertThat(zkConfig.getServerLists(), Is.is("localhost:2181"));
+ Assert.assertThat(zkConfig.getNamespace(), Is.is("myNamespace"));
+ Assert.assertThat(zkConfig.getBaseSleepTimeMilliseconds(), Is.is(1000));
+ Assert.assertThat(zkConfig.getMaxSleepTimeMilliseconds(), Is.is(3000));
+ Assert.assertThat(zkConfig.getMaxRetries(), Is.is(3));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperElectionServiceTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperElectionServiceTest.java
index bfe76d9..e233e74 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperElectionServiceTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperElectionServiceTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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 io.elasticjob.cloud.reg.zookeeper;
import io.elasticjob.cloud.fixture.EmbedTestingServer;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterForAuthTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterForAuthTest.java
index 4449650..f69dbdf 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterForAuthTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterForAuthTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterInitFailureTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterInitFailureTest.java
index 891f757..b69994a 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterInitFailureTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterInitFailureTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterMiscellaneousTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterMiscellaneousTest.java
index b5d32dc..4523677 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterMiscellaneousTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterMiscellaneousTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterModifyTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterModifyTest.java
index 9d0f175..4df3d7f 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterModifyTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterModifyTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
@@ -84,8 +84,7 @@ public final class ZookeeperRegistryCenterModifyTest {
assertNull(client.checkExists().forPath("/" + ZookeeperRegistryCenterModifyTest.class.getName() + "/ephemeral"));
zkRegCenter.init();
}
-
-
+
@Test
public void assertPersistSequential() throws Exception {
assertThat(zkRegCenter.persistSequential("/sequential/test_sequential", "test_value"), startsWith("/sequential/test_sequential"));
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterQueryWithCacheTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterQueryWithCacheTest.java
index 97c2143..496598d 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterQueryWithCacheTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterQueryWithCacheTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterQueryWithoutCacheTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterQueryWithoutCacheTest.java
index 3de97fb..cd836e3 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterQueryWithoutCacheTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/ZookeeperRegistryCenterQueryWithoutCacheTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,26 +13,20 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.reg.zookeeper;
import io.elasticjob.cloud.fixture.EmbedTestingServer;
import io.elasticjob.cloud.reg.zookeeper.util.ZookeeperRegistryCenterTestUtil;
+import org.hamcrest.core.Is;
import org.junit.AfterClass;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
-
import java.util.Arrays;
import java.util.Collections;
-import static junit.framework.TestCase.assertNull;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
public final class ZookeeperRegistryCenterQueryWithoutCacheTest {
private static final ZookeeperConfiguration ZOOKEEPER_CONFIGURATION =
@@ -56,44 +51,44 @@ public final class ZookeeperRegistryCenterQueryWithoutCacheTest {
@Test
public void assertGetFromServer() {
- assertThat(zkRegCenter.get("/test"), is("test"));
- assertThat(zkRegCenter.get("/test/deep/nested"), is("deepNested"));
+ Assert.assertThat(zkRegCenter.get("/test"), Is.is("test"));
+ Assert.assertThat(zkRegCenter.get("/test/deep/nested"), Is.is("deepNested"));
}
@Test
public void assertGetChildrenKeys() {
- assertThat(zkRegCenter.getChildrenKeys("/test"), is(Arrays.asList("deep", "child")));
- assertThat(zkRegCenter.getChildrenKeys("/test/deep"), is(Collections.singletonList("nested")));
- assertThat(zkRegCenter.getChildrenKeys("/test/child"), is(Collections.<String>emptyList()));
- assertThat(zkRegCenter.getChildrenKeys("/test/notExisted"), is(Collections.<String>emptyList()));
+ Assert.assertThat(zkRegCenter.getChildrenKeys("/test"), Is.is(Arrays.asList("deep", "child")));
+ Assert.assertThat(zkRegCenter.getChildrenKeys("/test/deep"), Is.is(Collections.singletonList("nested")));
+ Assert.assertThat(zkRegCenter.getChildrenKeys("/test/child"), Is.is(Collections.<String>emptyList()));
+ Assert.assertThat(zkRegCenter.getChildrenKeys("/test/notExisted"), Is.is(Collections.<String>emptyList()));
}
@Test
public void assertGetNumChildren() {
- assertThat(zkRegCenter.getNumChildren("/test"), is(2));
- assertThat(zkRegCenter.getNumChildren("/test/deep"), is(1));
- assertThat(zkRegCenter.getNumChildren("/test/child"), is(0));
- assertThat(zkRegCenter.getNumChildren("/test/notExisted"), is(0));
+ Assert.assertThat(zkRegCenter.getNumChildren("/test"), Is.is(2));
+ Assert.assertThat(zkRegCenter.getNumChildren("/test/deep"), Is.is(1));
+ Assert.assertThat(zkRegCenter.getNumChildren("/test/child"), Is.is(0));
+ Assert.assertThat(zkRegCenter.getNumChildren("/test/notExisted"), Is.is(0));
}
@Test
public void assertIsExisted() {
- assertTrue(zkRegCenter.isExisted("/test"));
- assertTrue(zkRegCenter.isExisted("/test/deep/nested"));
- assertFalse(zkRegCenter.isExisted("/notExisted"));
+ Assert.assertTrue(zkRegCenter.isExisted("/test"));
+ Assert.assertTrue(zkRegCenter.isExisted("/test/deep/nested"));
+ Assert.assertFalse(zkRegCenter.isExisted("/notExisted"));
}
@Test
public void assertGetRegistryCenterTime() {
long regCenterTime = zkRegCenter.getRegistryCenterTime("/_systemTime/current");
- assertTrue(regCenterTime <= System.currentTimeMillis());
+ Assert.assertTrue(regCenterTime <= System.currentTimeMillis());
long updatedRegCenterTime = zkRegCenter.getRegistryCenterTime("/_systemTime/current");
System.out.println(regCenterTime + "," + updatedRegCenterTime);
- assertTrue(regCenterTime < updatedRegCenterTime);
+ Assert.assertTrue(regCenterTime < updatedRegCenterTime);
}
@Test
public void assertGetWithoutNode() {
- assertNull(zkRegCenter.get("/notExisted"));
+ Assert.assertNull(zkRegCenter.get("/notExisted"));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/util/ZookeeperRegistryCenterTestUtil.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/util/ZookeeperRegistryCenterTestUtil.java
index 485d94d..3de5be0 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/util/ZookeeperRegistryCenterTestUtil.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/reg/zookeeper/util/ZookeeperRegistryCenterTestUtil.java
@@ -1,3 +1,20 @@
+/*
+ * 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 io.elasticjob.cloud.reg.zookeeper.util;
import io.elasticjob.cloud.reg.zookeeper.ZookeeperRegistryCenter;
@@ -6,7 +23,11 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ZookeeperRegistryCenterTestUtil {
-
+
+ /**
+ * Persist zookeeper registry center.
+ * @param zookeeperRegistryCenter zookeeper registry center.
+ */
public static void persist(final ZookeeperRegistryCenter zookeeperRegistryCenter) {
zookeeperRegistryCenter.persist("/test", "test");
zookeeperRegistryCenter.persist("/test/deep/nested", "deepNested");
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/statistics/AllStatisticsTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/statistics/AllStatisticsTests.java
index 0d1adc3..b55cb99 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/statistics/AllStatisticsTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/statistics/AllStatisticsTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/statistics/rdb/StatisticRdbRepositoryTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/statistics/rdb/StatisticRdbRepositoryTest.java
index ae59806..1d81a49 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/statistics/rdb/StatisticRdbRepositoryTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/statistics/rdb/StatisticRdbRepositoryTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.statistics.rdb;
@@ -24,20 +24,17 @@ import io.elasticjob.cloud.statistics.type.job.JobRunningStatistics;
import io.elasticjob.cloud.statistics.type.task.TaskResultStatistics;
import io.elasticjob.cloud.statistics.type.task.TaskRunningStatistics;
import org.apache.commons.dbcp.BasicDataSource;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.sql.SQLException;
import java.util.Date;
-import static junit.framework.TestCase.assertTrue;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-
public class StatisticRdbRepositoryTest {
- private StatisticRdbRepository repository;
+ private StatisticRdbRepository repository;
@Before
public void setup() throws SQLException {
@@ -52,30 +49,30 @@ public class StatisticRdbRepositoryTest {
@Test
public void assertAddTaskResultStatistics() {
for (StatisticInterval each : StatisticInterval.values()) {
- assertTrue(repository.add(new TaskResultStatistics(100, 0, each, new Date())));
+ Assert.assertTrue(repository.add(new TaskResultStatistics(100, 0, each, new Date())));
}
}
@Test
public void assertAddTaskRunningStatistics() {
- assertTrue(repository.add(new TaskRunningStatistics(100, new Date())));
+ Assert.assertTrue(repository.add(new TaskRunningStatistics(100, new Date())));
}
@Test
public void assertAddJobRunningStatistics() {
- assertTrue(repository.add(new TaskRunningStatistics(100, new Date())));
+ Assert.assertTrue(repository.add(new TaskRunningStatistics(100, new Date())));
}
@Test
public void assertAddJobRegisterStatistics() {
- assertTrue(repository.add(new JobRegisterStatistics(100, new Date())));
+ Assert.assertTrue(repository.add(new JobRegisterStatistics(100, new Date())));
}
@Test
public void assertFindTaskResultStatisticsWhenTableIsEmpty() {
- assertThat(repository.findTaskResultStatistics(new Date(), StatisticInterval.MINUTE).size(), is(0));
- assertThat(repository.findTaskResultStatistics(new Date(), StatisticInterval.HOUR).size(), is(0));
- assertThat(repository.findTaskResultStatistics(new Date(), StatisticInterval.DAY).size(), is(0));
+ Assert.assertThat(repository.findTaskResultStatistics(new Date(), StatisticInterval.MINUTE).size(), Is.is(0));
+ Assert.assertThat(repository.findTaskResultStatistics(new Date(), StatisticInterval.HOUR).size(), Is.is(0));
+ Assert.assertThat(repository.findTaskResultStatistics(new Date(), StatisticInterval.DAY).size(), Is.is(0));
}
@Test
@@ -83,10 +80,10 @@ public class StatisticRdbRepositoryTest {
Date now = new Date();
Date yesterday = getYesterday();
for (StatisticInterval each : StatisticInterval.values()) {
- assertTrue(repository.add(new TaskResultStatistics(100, 0, each, yesterday)));
- assertTrue(repository.add(new TaskResultStatistics(100, 0, each, now)));
- assertThat(repository.findTaskResultStatistics(yesterday, each).size(), is(2));
- assertThat(repository.findTaskResultStatistics(now, each).size(), is(1));
+ Assert.assertTrue(repository.add(new TaskResultStatistics(100, 0, each, yesterday)));
+ Assert.assertTrue(repository.add(new TaskResultStatistics(100, 0, each, now)));
+ Assert.assertThat(repository.findTaskResultStatistics(yesterday, each).size(), Is.is(2));
+ Assert.assertThat(repository.findTaskResultStatistics(now, each).size(), Is.is(1));
}
}
@@ -94,8 +91,8 @@ public class StatisticRdbRepositoryTest {
public void assertGetSummedTaskResultStatisticsWhenTableIsEmpty() {
for (StatisticInterval each : StatisticInterval.values()) {
TaskResultStatistics po = repository.getSummedTaskResultStatistics(new Date(), each);
- assertThat(po.getSuccessCount(), is(0));
- assertThat(po.getFailedCount(), is(0));
+ Assert.assertThat(po.getSuccessCount(), Is.is(0));
+ Assert.assertThat(po.getFailedCount(), Is.is(0));
}
}
@@ -106,15 +103,15 @@ public class StatisticRdbRepositoryTest {
repository.add(new TaskResultStatistics(100, 2, each, date));
repository.add(new TaskResultStatistics(200, 5, each, date));
TaskResultStatistics po = repository.getSummedTaskResultStatistics(date, each);
- assertThat(po.getSuccessCount(), is(300));
- assertThat(po.getFailedCount(), is(7));
+ Assert.assertThat(po.getSuccessCount(), Is.is(300));
+ Assert.assertThat(po.getFailedCount(), Is.is(7));
}
}
@Test
public void assertFindLatestTaskResultStatisticsWhenTableIsEmpty() {
for (StatisticInterval each : StatisticInterval.values()) {
- assertFalse(repository.findLatestTaskResultStatistics(each).isPresent());
+ Assert.assertFalse(repository.findLatestTaskResultStatistics(each).isPresent());
}
}
@@ -124,29 +121,29 @@ public class StatisticRdbRepositoryTest {
repository.add(new TaskResultStatistics(100, 2, each, new Date()));
repository.add(new TaskResultStatistics(200, 5, each, new Date()));
Optional<TaskResultStatistics> po = repository.findLatestTaskResultStatistics(each);
- assertThat(po.get().getSuccessCount(), is(200));
- assertThat(po.get().getFailedCount(), is(5));
+ Assert.assertThat(po.get().getSuccessCount(), Is.is(200));
+ Assert.assertThat(po.get().getFailedCount(), Is.is(5));
}
}
@Test
public void assertFindTaskRunningStatisticsWhenTableIsEmpty() {
- assertThat(repository.findTaskRunningStatistics(new Date()).size(), is(0));
+ Assert.assertThat(repository.findTaskRunningStatistics(new Date()).size(), Is.is(0));
}
@Test
public void assertFindTaskRunningStatisticsWithDifferentFromDate() {
Date now = new Date();
Date yesterday = getYesterday();
- assertTrue(repository.add(new TaskRunningStatistics(100, yesterday)));
- assertTrue(repository.add(new TaskRunningStatistics(100, now)));
- assertThat(repository.findTaskRunningStatistics(yesterday).size(), is(2));
- assertThat(repository.findTaskRunningStatistics(now).size(), is(1));
+ Assert.assertTrue(repository.add(new TaskRunningStatistics(100, yesterday)));
+ Assert.assertTrue(repository.add(new TaskRunningStatistics(100, now)));
+ Assert.assertThat(repository.findTaskRunningStatistics(yesterday).size(), Is.is(2));
+ Assert.assertThat(repository.findTaskRunningStatistics(now).size(), Is.is(1));
}
@Test
public void assertFindLatestTaskRunningStatisticsWhenTableIsEmpty() {
- assertFalse(repository.findLatestTaskRunningStatistics().isPresent());
+ Assert.assertFalse(repository.findLatestTaskRunningStatistics().isPresent());
}
@Test
@@ -154,27 +151,27 @@ public class StatisticRdbRepositoryTest {
repository.add(new TaskRunningStatistics(100, new Date()));
repository.add(new TaskRunningStatistics(200, new Date()));
Optional<TaskRunningStatistics> po = repository.findLatestTaskRunningStatistics();
- assertThat(po.get().getRunningCount(), is(200));
+ Assert.assertThat(po.get().getRunningCount(), Is.is(200));
}
@Test
public void assertFindJobRunningStatisticsWhenTableIsEmpty() {
- assertThat(repository.findJobRunningStatistics(new Date()).size(), is(0));
+ Assert.assertThat(repository.findJobRunningStatistics(new Date()).size(), Is.is(0));
}
@Test
public void assertFindJobRunningStatisticsWithDifferentFromDate() {
Date now = new Date();
Date yesterday = getYesterday();
- assertTrue(repository.add(new JobRunningStatistics(100, yesterday)));
- assertTrue(repository.add(new JobRunningStatistics(100, now)));
- assertThat(repository.findJobRunningStatistics(yesterday).size(), is(2));
- assertThat(repository.findJobRunningStatistics(now).size(), is(1));
+ Assert.assertTrue(repository.add(new JobRunningStatistics(100, yesterday)));
+ Assert.assertTrue(repository.add(new JobRunningStatistics(100, now)));
+ Assert.assertThat(repository.findJobRunningStatistics(yesterday).size(), Is.is(2));
+ Assert.assertThat(repository.findJobRunningStatistics(now).size(), Is.is(1));
}
@Test
public void assertFindLatestJobRunningStatisticsWhenTableIsEmpty() {
- assertFalse(repository.findLatestJobRunningStatistics().isPresent());
+ Assert.assertFalse(repository.findLatestJobRunningStatistics().isPresent());
}
@Test
@@ -182,27 +179,27 @@ public class StatisticRdbRepositoryTest {
repository.add(new JobRunningStatistics(100, new Date()));
repository.add(new JobRunningStatistics(200, new Date()));
Optional<JobRunningStatistics> po = repository.findLatestJobRunningStatistics();
- assertThat(po.get().getRunningCount(), is(200));
+ Assert.assertThat(po.get().getRunningCount(), Is.is(200));
}
@Test
public void assertFindJobRegisterStatisticsWhenTableIsEmpty() {
- assertThat(repository.findJobRegisterStatistics(new Date()).size(), is(0));
+ Assert.assertThat(repository.findJobRegisterStatistics(new Date()).size(), Is.is(0));
}
@Test
public void assertFindJobRegisterStatisticsWithDifferentFromDate() {
Date now = new Date();
Date yesterday = getYesterday();
- assertTrue(repository.add(new JobRegisterStatistics(100, yesterday)));
- assertTrue(repository.add(new JobRegisterStatistics(100, now)));
- assertThat(repository.findJobRegisterStatistics(yesterday).size(), is(2));
- assertThat(repository.findJobRegisterStatistics(now).size(), is(1));
+ Assert.assertTrue(repository.add(new JobRegisterStatistics(100, yesterday)));
+ Assert.assertTrue(repository.add(new JobRegisterStatistics(100, now)));
+ Assert.assertThat(repository.findJobRegisterStatistics(yesterday).size(), Is.is(2));
+ Assert.assertThat(repository.findJobRegisterStatistics(now).size(), Is.is(1));
}
@Test
public void assertFindLatestJobRegisterStatisticsWhenTableIsEmpty() {
- assertFalse(repository.findLatestJobRegisterStatistics().isPresent());
+ Assert.assertFalse(repository.findLatestJobRegisterStatistics().isPresent());
}
@Test
@@ -210,7 +207,7 @@ public class StatisticRdbRepositoryTest {
repository.add(new JobRegisterStatistics(100, new Date()));
repository.add(new JobRegisterStatistics(200, new Date()));
Optional<JobRegisterStatistics> po = repository.findLatestJobRegisterStatistics();
- assertThat(po.get().getRegisteredCount(), is(200));
+ Assert.assertThat(po.get().getRegisteredCount(), Is.is(200));
}
private Date getYesterday() {
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/AllUtilTests.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/AllUtilTests.java
index 092835a..cccd0e2 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/AllUtilTests.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/AllUtilTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/concurrent/ExecutorServiceObjectTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/concurrent/ExecutorServiceObjectTest.java
index 6c959c9..546ece6 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/concurrent/ExecutorServiceObjectTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/concurrent/ExecutorServiceObjectTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,20 +13,15 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.concurrent;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-
import java.util.concurrent.ExecutorService;
-import static junit.framework.TestCase.assertFalse;
-import static junit.framework.TestCase.assertTrue;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
-
public final class ExecutorServiceObjectTest {
private ExecutorServiceObject executorServiceObject;
@@ -33,23 +29,23 @@ public final class ExecutorServiceObjectTest {
@Test
public void assertCreateExecutorService() {
executorServiceObject = new ExecutorServiceObject("executor-service-test", 1);
- assertThat(executorServiceObject.getActiveThreadCount(), is(0));
- assertThat(executorServiceObject.getWorkQueueSize(), is(0));
- assertFalse(executorServiceObject.isShutdown());
+ Assert.assertThat(executorServiceObject.getActiveThreadCount(), Is.is(0));
+ Assert.assertThat(executorServiceObject.getWorkQueueSize(), Is.is(0));
+ Assert.assertFalse(executorServiceObject.isShutdown());
ExecutorService executorService = executorServiceObject.createExecutorService();
executorService.submit(new FooTask());
BlockUtils.waitingShortTime();
- assertThat(executorServiceObject.getActiveThreadCount(), is(1));
- assertThat(executorServiceObject.getWorkQueueSize(), is(0));
- assertFalse(executorServiceObject.isShutdown());
+ Assert.assertThat(executorServiceObject.getActiveThreadCount(), Is.is(1));
+ Assert.assertThat(executorServiceObject.getWorkQueueSize(), Is.is(0));
+ Assert.assertFalse(executorServiceObject.isShutdown());
executorService.submit(new FooTask());
BlockUtils.waitingShortTime();
- assertThat(executorServiceObject.getActiveThreadCount(), is(1));
- assertThat(executorServiceObject.getWorkQueueSize(), is(1));
- assertFalse(executorServiceObject.isShutdown());
+ Assert.assertThat(executorServiceObject.getActiveThreadCount(), Is.is(1));
+ Assert.assertThat(executorServiceObject.getWorkQueueSize(), Is.is(1));
+ Assert.assertFalse(executorServiceObject.isShutdown());
executorService.shutdownNow();
- assertThat(executorServiceObject.getWorkQueueSize(), is(0));
- assertTrue(executorServiceObject.isShutdown());
+ Assert.assertThat(executorServiceObject.getWorkQueueSize(), Is.is(0));
+ Assert.assertTrue(executorServiceObject.isShutdown());
}
class FooTask implements Runnable {
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/config/ShardingItemParametersTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/config/ShardingItemParametersTest.java
index 8f7f3b0..470f28a 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/config/ShardingItemParametersTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/config/ShardingItemParametersTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.config;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/config/ShardingItemsTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/config/ShardingItemsTest.java
index ebd61ad..bf88c04 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/config/ShardingItemsTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/config/ShardingItemsTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.config;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/digest/EncryptionTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/digest/EncryptionTest.java
index c1ffe78..cc3161a 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/digest/EncryptionTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/digest/EncryptionTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,20 +13,18 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.digest;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class EncryptionTest {
@Test
public void assertMd5() {
- assertThat(Encryption.md5("test"), is("98f6bcd4621d373cade4e832627b4f6"));
+ Assert.assertThat(Encryption.md5("test"), Is.is("98f6bcd4621d373cade4e832627b4f6"));
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/HostExceptionTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/HostExceptionTest.java
index 5424316..ea44c23 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/HostExceptionTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/HostExceptionTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.env;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/IpUtilsTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/IpUtilsTest.java
index 33d8144..f18f117 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/IpUtilsTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/IpUtilsTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.env;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/TimeServiceTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/TimeServiceTest.java
index 1cca186..13920b1 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/TimeServiceTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/env/TimeServiceTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,22 +13,19 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.env;
+import org.junit.Assert;
import org.junit.Test;
-import static junit.framework.TestCase.assertTrue;
-
-
public class TimeServiceTest {
private TimeService timeService = new TimeService();
@Test
public void assertGetCurrentMillis() throws Exception {
- assertTrue(timeService.getCurrentMillis() <= System.currentTimeMillis());
+ Assert.assertTrue(timeService.getCurrentMillis() <= System.currentTimeMillis());
}
}
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/json/GsonFactoryTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/json/GsonFactoryTest.java
index 0cfc991..f1107a9 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/json/GsonFactoryTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/json/GsonFactoryTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.json;
diff --git a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/json/JobConfigurationGsonTypeAdapterTest.java b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/json/JobConfigurationGsonTypeAdapterTest.java
index ab92232..3e13171 100644
--- a/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/json/JobConfigurationGsonTypeAdapterTest.java
+++ b/elastic-job-cloud-common/src/test/java/io/elasticjob/cloud/util/json/JobConfigurationGsonTypeAdapterTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.util.json;
@@ -29,15 +29,13 @@ import io.elasticjob.cloud.executor.handler.impl.DefaultExecutorServiceHandler;
import io.elasticjob.cloud.fixture.handler.IgnoreJobExceptionHandler;
import io.elasticjob.cloud.fixture.handler.ThrowJobExceptionHandler;
import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.IOException;
import java.util.Map;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
public final class JobConfigurationGsonTypeAdapterTest {
@BeforeClass
@@ -47,21 +45,21 @@ public final class JobConfigurationGsonTypeAdapterTest {
@Test
public void assertToSimpleJobJson() {
- assertThat(GsonFactory.getGson().toJson(new TestJobRootConfiguration(
+ Assert.assertThat(GsonFactory.getGson().toJson(new TestJobRootConfiguration(
new TestSimpleJobConfiguration(ThrowJobExceptionHandler.class.getCanonicalName(), DefaultExecutorServiceHandler.class.getCanonicalName()).getTypeConfig())),
Is.is(APIJsonConstants.getSimpleJobJson(ThrowJobExceptionHandler.class.getCanonicalName())));
}
@Test
public void assertToDataflowJobJson() {
- assertThat(GsonFactory.getGson().toJson(new TestJobRootConfiguration(new TestDataflowJobConfiguration(true).getTypeConfig())),
- is(APIJsonConstants.getDataflowJobJson(IgnoreJobExceptionHandler.class.getCanonicalName())));
+ Assert.assertThat(GsonFactory.getGson().toJson(new TestJobRootConfiguration(new TestDataflowJobConfiguration(true).getTypeConfig())),
+ Is.is(APIJsonConstants.getDataflowJobJson(IgnoreJobExceptionHandler.class.getCanonicalName())));
}
@Test
public void assertToScriptJobJson() {
- assertThat(GsonFactory.getGson().toJson(new TestJobRootConfiguration(new TestScriptJobConfiguration("test.sh", ThrowJobExceptionHandler.class).getTypeConfig())),
- is(APIJsonConstants.getScriptJobJson(ThrowJobExceptionHandler.class.getCanonicalName())));
+ Assert.assertThat(GsonFactory.getGson().toJson(new TestJobRootConfiguration(new TestScriptJobConfiguration("test.sh", ThrowJobExceptionHandler.class).getTypeConfig())),
+ Is.is(APIJsonConstants.getScriptJobJson(ThrowJobExceptionHandler.class.getCanonicalName())));
}
@Test
@@ -70,7 +68,7 @@ public final class JobConfigurationGsonTypeAdapterTest {
APIJsonConstants.getSimpleJobJson(ThrowJobExceptionHandler.class.getCanonicalName()), TestJobRootConfiguration.class);
TestJobRootConfiguration expected = new TestJobRootConfiguration(
new TestSimpleJobConfiguration(ThrowJobExceptionHandler.class.getCanonicalName(), DefaultExecutorServiceHandler.class.getCanonicalName()).getTypeConfig());
- assertThat(GsonFactory.getGson().toJson(actual), is(GsonFactory.getGson().toJson(expected)));
+ Assert.assertThat(GsonFactory.getGson().toJson(actual), Is.is(GsonFactory.getGson().toJson(expected)));
}
@Test
@@ -78,7 +76,7 @@ public final class JobConfigurationGsonTypeAdapterTest {
TestJobRootConfiguration actual = GsonFactory.getGson().fromJson(
APIJsonConstants.getDataflowJobJson(IgnoreJobExceptionHandler.class.getCanonicalName()), TestJobRootConfiguration.class);
TestJobRootConfiguration expected = new TestJobRootConfiguration(new TestDataflowJobConfiguration(true).getTypeConfig());
- assertThat(GsonFactory.getGson().toJson(actual), is(GsonFactory.getGson().toJson(expected)));
+ Assert.assertThat(GsonFactory.getGson().toJson(actual), Is.is(GsonFactory.getGson().toJson(expected)));
}
@Test
@@ -86,7 +84,7 @@ public final class JobConfigurationGsonTypeAdapterTest {
TestJobRootConfiguration actual = GsonFactory.getGson().fromJson(
APIJsonConstants.getScriptJobJson(ThrowJobExceptionHandler.class.getCanonicalName()), TestJobRootConfiguration.class);
TestJobRootConfiguration expected = new TestJobRootConfiguration(new TestScriptJobConfiguration("test.sh", ThrowJobExceptionHandler.class).getTypeConfig());
- assertThat(GsonFactory.getGson().toJson(actual), is(GsonFactory.getGson().toJson(expected)));
+ Assert.assertThat(GsonFactory.getGson().toJson(actual), Is.is(GsonFactory.getGson().toJson(expected)));
}
private static class JobConfigurationGsonTypeAdapter extends AbstractJobConfigurationGsonTypeAdapter<TestJobRootConfiguration> {
diff --git a/elastic-job-cloud-common/src/test/resources/conf/reg/local.properties b/elastic-job-cloud-common/src/test/resources/conf/reg/local.properties
index 6b77fa2..62c3d00 100644
--- a/elastic-job-cloud-common/src/test/resources/conf/reg/local.properties
+++ b/elastic-job-cloud-common/src/test/resources/conf/reg/local.properties
@@ -1,3 +1,20 @@
+#
+# 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.
+#
+
/test=test
/test/deep/nested=deepNested
/test/child=child
diff --git a/elastic-job-cloud-common/src/test/resources/conf/reg/local_overwrite.properties b/elastic-job-cloud-common/src/test/resources/conf/reg/local_overwrite.properties
index 41a69be..3517181 100644
--- a/elastic-job-cloud-common/src/test/resources/conf/reg/local_overwrite.properties
+++ b/elastic-job-cloud-common/src/test/resources/conf/reg/local_overwrite.properties
@@ -1,3 +1,20 @@
+#
+# 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.
+#
+
/test=test_overwrite
/test/deep/nested=deepNested_overwrite
/new=new
diff --git a/elastic-job-cloud-common/src/test/resources/logback-test.xml b/elastic-job-cloud-common/src/test/resources/logback-test.xml
index 8db3a18..03049cb 100644
--- a/elastic-job-cloud-common/src/test/resources/logback-test.xml
+++ b/elastic-job-cloud-common/src/test/resources/logback-test.xml
@@ -1,4 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
<configuration>
<property name="log.context.name" value="elastic-job-common-core-test" />
<property name="log.charset" value="UTF-8" />
diff --git a/elastic-job-cloud-executor/pom.xml b/elastic-job-cloud-executor/pom.xml
index 079fca4..6fd0ec5 100644
--- a/elastic-job-cloud-executor/pom.xml
+++ b/elastic-job-cloud-executor/pom.xml
@@ -1,8 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>elastic-job-cloud</artifactId>
- <groupId>io.elasticjob</groupId>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
<version>3.0.0.M1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -11,7 +28,7 @@
<dependencies>
<dependency>
- <groupId>io.elasticjob</groupId>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elastic-job-cloud-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
diff --git a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/api/JobBootstrap.java b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/api/JobBootstrap.java
index a1ae34f..7e466c6 100644
--- a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/api/JobBootstrap.java
+++ b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/api/JobBootstrap.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.api;
diff --git a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/CloudJobFacade.java b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/CloudJobFacade.java
index a9ff9de..b1627e2 100644
--- a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/CloudJobFacade.java
+++ b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/CloudJobFacade.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
@@ -62,7 +62,11 @@ public final class CloudJobFacade implements JobFacade {
@Override
public void registerJobCompleted(final ShardingContexts shardingContexts) {
}
-
+
+ /**
+ * Get sharding contexts.
+ * @return ShardingContexts
+ */
public ShardingContexts getShardingContexts() {
return shardingContexts;
}
diff --git a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/DaemonTaskScheduler.java b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/DaemonTaskScheduler.java
index 30ab6ff..033233e 100644
--- a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/DaemonTaskScheduler.java
+++ b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/DaemonTaskScheduler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,15 +13,11 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
import io.elasticjob.cloud.api.ElasticJob;
-import io.elasticjob.cloud.executor.JobExecutorFactory;
-import io.elasticjob.cloud.executor.JobFacade;
-import io.elasticjob.cloud.executor.ShardingContexts;
import io.elasticjob.cloud.config.JobRootConfiguration;
import io.elasticjob.cloud.exception.JobSystemException;
import lombok.RequiredArgsConstructor;
diff --git a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/JobConfigurationContext.java b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/JobConfigurationContext.java
index cf18f06..5bd576c 100644
--- a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/JobConfigurationContext.java
+++ b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/JobConfigurationContext.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/TaskExecutor.java b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/TaskExecutor.java
index f7af24f..8db199d 100644
--- a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/TaskExecutor.java
+++ b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/TaskExecutor.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/local/LocalCloudJobConfiguration.java b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/local/LocalCloudJobConfiguration.java
index c4b8639..15c7c54 100644
--- a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/local/LocalCloudJobConfiguration.java
+++ b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/local/LocalCloudJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.local;
diff --git a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/local/LocalTaskExecutor.java b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/local/LocalTaskExecutor.java
index b77708f..42befd1 100644
--- a/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/local/LocalTaskExecutor.java
+++ b/elastic-job-cloud-executor/src/main/java/io/elasticjob/cloud/executor/local/LocalTaskExecutor.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.local;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/AllCloudExecutorTests.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/AllCloudExecutorTests.java
index e2009a8..9f794a7 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/AllCloudExecutorTests.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/AllCloudExecutorTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/CloudJobFacadeTest.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/CloudJobFacadeTest.java
index 6ed0a5e..ad7b094 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/CloudJobFacadeTest.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/CloudJobFacadeTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/DaemonTaskSchedulerTest.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/DaemonTaskSchedulerTest.java
index fc7876a..d6124bc 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/DaemonTaskSchedulerTest.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/DaemonTaskSchedulerTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/JobConfigurationContextTest.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/JobConfigurationContextTest.java
index dc3ebdb..e5133f6 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/JobConfigurationContextTest.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/JobConfigurationContextTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
@@ -23,31 +23,28 @@ import io.elasticjob.cloud.executor.fixture.TestJob;
import io.elasticjob.cloud.config.dataflow.DataflowJobConfiguration;
import io.elasticjob.cloud.config.simple.SimpleJobConfiguration;
import io.elasticjob.cloud.exception.JobExecutionEnvironmentException;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
-import static junit.framework.TestCase.assertFalse;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
public class JobConfigurationContextTest {
@Test
public void assertSimpleJobConfigurationContext() throws JobExecutionEnvironmentException {
- assertTrue(new JobConfigurationContext(buildJobConfigurationContextMap(JobType.SIMPLE)).getTypeConfig() instanceof SimpleJobConfiguration);
+ Assert.assertTrue(new JobConfigurationContext(buildJobConfigurationContextMap(JobType.SIMPLE)).getTypeConfig() instanceof SimpleJobConfiguration);
}
@Test
public void assertDataflowJobConfigurationContext() throws JobExecutionEnvironmentException {
- assertTrue(new JobConfigurationContext(buildJobConfigurationContextMap(JobType.DATAFLOW)).getTypeConfig() instanceof DataflowJobConfiguration);
+ Assert.assertTrue(new JobConfigurationContext(buildJobConfigurationContextMap(JobType.DATAFLOW)).getTypeConfig() instanceof DataflowJobConfiguration);
}
@Test
public void assertScriptJobConfigurationContext() throws JobExecutionEnvironmentException {
- assertTrue(new JobConfigurationContext(buildJobConfigurationContextMap(JobType.SCRIPT)).getTypeConfig() instanceof ScriptJobConfiguration);
+ Assert.assertTrue(new JobConfigurationContext(buildJobConfigurationContextMap(JobType.SCRIPT)).getTypeConfig() instanceof ScriptJobConfiguration);
}
@Test
@@ -55,16 +52,16 @@ public class JobConfigurationContextTest {
Map<String, String> context = buildJobConfigurationContextMap(JobType.SIMPLE);
context.put("beanName", "springSimpleJobName");
context.put("applicationContext", "applicationContext.xml");
- assertThat(new JobConfigurationContext(context).getBeanName(), is("springSimpleJobName"));
- assertThat(new JobConfigurationContext(context).getApplicationContext(), is("applicationContext.xml"));
+ Assert.assertThat(new JobConfigurationContext(context).getBeanName(), Is.is("springSimpleJobName"));
+ Assert.assertThat(new JobConfigurationContext(context).getApplicationContext(), Is.is("applicationContext.xml"));
}
@Test
public void assertSimpleJobConfigurationContextWithExecutionType() throws JobExecutionEnvironmentException {
Map<String, String> context = buildJobConfigurationContextMap(JobType.SIMPLE);
- assertTrue(new JobConfigurationContext(context).isTransient());
+ Assert.assertTrue(new JobConfigurationContext(context).isTransient());
context.put("cron", "0/1 * * * * ?");
- assertFalse(new JobConfigurationContext(context).isTransient());
+ Assert.assertFalse(new JobConfigurationContext(context).isTransient());
}
private Map<String, String> buildJobConfigurationContextMap(final JobType jobType) {
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/TaskExecutorTest.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/TaskExecutorTest.java
index 66534ac..456807b 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/TaskExecutorTest.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/TaskExecutorTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/TaskExecutorThreadTest.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/TaskExecutorThreadTest.java
index 24601f3..96c36fc 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/TaskExecutorThreadTest.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/TaskExecutorThreadTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor;
@@ -28,9 +28,11 @@ import org.apache.mesos.Protos;
import org.apache.mesos.Protos.TaskID;
import org.apache.mesos.Protos.TaskInfo;
import org.apache.mesos.Protos.TaskState;
+import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
+import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import java.util.Collections;
@@ -38,9 +40,6 @@ import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
-import static junit.framework.TestCase.assertTrue;
-import static org.mockito.Mockito.verify;
-
@RunWith(MockitoJUnitRunner.class)
public final class TaskExecutorThreadTest {
@@ -54,8 +53,8 @@ public final class TaskExecutorThreadTest {
TaskInfo taskInfo = buildJavaTransientTaskInfo();
TaskExecutor.TaskThread taskThread = new TaskExecutor().new TaskThread(executorDriver, taskInfo);
taskThread.run();
- verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(TaskState.TASK_RUNNING).build());
- verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(Protos.TaskState.TASK_FINISHED).build());
+ Mockito.verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(TaskState.TASK_RUNNING).build());
+ Mockito.verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(Protos.TaskState.TASK_FINISHED).build());
}
@Test
@@ -63,7 +62,7 @@ public final class TaskExecutorThreadTest {
TaskInfo taskInfo = buildSpringDaemonTaskInfo();
TaskExecutor.TaskThread taskThread = new TaskExecutor().new TaskThread(executorDriver, taskInfo);
taskThread.run();
- verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(TaskState.TASK_RUNNING).build());
+ Mockito.verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(TaskState.TASK_RUNNING).build());
}
@Test
@@ -71,8 +70,8 @@ public final class TaskExecutorThreadTest {
TaskInfo taskInfo = buildSpringScriptTransientTaskInfo();
TaskExecutor.TaskThread taskThread = new TaskExecutor().new TaskThread(executorDriver, taskInfo);
taskThread.run();
- verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(TaskState.TASK_RUNNING).build());
- verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(Protos.TaskState.TASK_FINISHED).build());
+ Mockito.verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(TaskState.TASK_RUNNING).build());
+ Mockito.verify(executorDriver).sendStatusUpdate(Protos.TaskStatus.newBuilder().setTaskId(taskInfo.getTaskId()).setState(Protos.TaskState.TASK_FINISHED).build());
}
@Test
@@ -82,7 +81,7 @@ public final class TaskExecutorThreadTest {
try {
taskThread.run();
} catch (final JobSystemException ex) {
- assertTrue(ex.getMessage().startsWith("Elastic-Job: Class 'io.elasticjob.cloud.executor.TaskExecutorThreadTest' must implements ElasticJob interface."));
+ Assert.assertTrue(ex.getMessage().startsWith("Elastic-Job: Class 'io.elasticjob.cloud.executor.TaskExecutorThreadTest' must implements ElasticJob interface."));
}
}
@@ -93,7 +92,7 @@ public final class TaskExecutorThreadTest {
try {
taskThread.run();
} catch (final JobSystemException ex) {
- assertTrue(ex.getMessage().startsWith("Elastic-Job: Class 'WrongClass' initialize failure, the error message is 'WrongClass'."));
+ Assert.assertTrue(ex.getMessage().startsWith("Elastic-Job: Class 'WrongClass' initialize failure, the error message is 'WrongClass'."));
}
}
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/fixture/TestJob.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/fixture/TestJob.java
index c48f115..80b1cf5 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/fixture/TestJob.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/fixture/TestJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.fixture;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/fixture/TestScriptJobConfiguration.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/fixture/TestScriptJobConfiguration.java
index f9f172f..c38b568 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/fixture/TestScriptJobConfiguration.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/fixture/TestScriptJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,12 +13,10 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.fixture;
-
import io.elasticjob.cloud.config.JobTypeConfiguration;
import io.elasticjob.cloud.config.script.ScriptJobConfiguration;
import io.elasticjob.cloud.config.JobCoreConfiguration;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/AllLocalExecutorTests.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/AllLocalExecutorTests.java
index 7360cf1..a79a3a8 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/AllLocalExecutorTests.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/AllLocalExecutorTests.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.local;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/LocalTaskExecutorTest.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/LocalTaskExecutorTest.java
index ba7e0e7..5179cc4 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/LocalTaskExecutorTest.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/LocalTaskExecutorTest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.local;
@@ -24,6 +24,8 @@ import io.elasticjob.cloud.config.JobCoreConfiguration;
import io.elasticjob.cloud.config.dataflow.DataflowJobConfiguration;
import io.elasticjob.cloud.config.simple.SimpleJobConfiguration;
import io.elasticjob.cloud.exception.JobSystemException;
+import org.hamcrest.core.Is;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -34,12 +36,6 @@ import java.nio.file.Paths;
import java.nio.file.attribute.PosixFilePermissions;
import java.util.Arrays;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
public final class LocalTaskExecutorTest {
@Before
@@ -53,12 +49,12 @@ public final class LocalTaskExecutorTest {
public void assertSimpleJob() {
new LocalTaskExecutor(new LocalCloudJobConfiguration(new SimpleJobConfiguration(JobCoreConfiguration
.newBuilder(TestSimpleJob.class.getSimpleName(), "*/2 * * * * ?", 3).build(), TestSimpleJob.class.getName()), 1)).execute();
- assertThat(TestSimpleJob.getShardingContext().getJobName(), is(TestSimpleJob.class.getSimpleName()));
- assertThat(TestSimpleJob.getShardingContext().getShardingItem(), is(1));
- assertThat(TestSimpleJob.getShardingContext().getShardingTotalCount(), is(3));
- assertThat(TestSimpleJob.getShardingContext().getShardingItem(), is(1));
- assertNull(TestSimpleJob.getShardingContext().getShardingParameter());
- assertThat(TestSimpleJob.getShardingContext().getJobParameter(), is(""));
+ Assert.assertThat(TestSimpleJob.getShardingContext().getJobName(), Is.is(TestSimpleJob.class.getSimpleName()));
+ Assert.assertThat(TestSimpleJob.getShardingContext().getShardingItem(), Is.is(1));
+ Assert.assertThat(TestSimpleJob.getShardingContext().getShardingTotalCount(), Is.is(3));
+ Assert.assertThat(TestSimpleJob.getShardingContext().getShardingItem(), Is.is(1));
+ Assert.assertNull(TestSimpleJob.getShardingContext().getShardingParameter());
+ Assert.assertThat(TestSimpleJob.getShardingContext().getJobParameter(), Is.is(""));
}
@Test
@@ -66,12 +62,12 @@ public final class LocalTaskExecutorTest {
new LocalTaskExecutor(new LocalCloudJobConfiguration(new SimpleJobConfiguration(JobCoreConfiguration.newBuilder(
TestSimpleJob.class.getSimpleName(), "*/2 * * * * ?", 3).shardingItemParameters("0=Beijing,1=Shanghai,2=Guangzhou").jobParameter("dbName=dangdang").build(),
TestSimpleJob.class.getName()), 1, "testSimpleJob", "applicationContext.xml")).execute();
- assertThat(TestSimpleJob.getShardingContext().getJobName(), is(TestSimpleJob.class.getSimpleName()));
- assertThat(TestSimpleJob.getShardingContext().getShardingTotalCount(), is(3));
- assertThat(TestSimpleJob.getShardingContext().getJobParameter(), is("dbName=dangdang"));
- assertThat(TestSimpleJob.getShardingContext().getShardingItem(), is(1));
- assertThat(TestSimpleJob.getShardingParameters().size(), is(1));
- assertThat(TestSimpleJob.getShardingParameters().iterator().next(), is("Shanghai"));
+ Assert.assertThat(TestSimpleJob.getShardingContext().getJobName(), Is.is(TestSimpleJob.class.getSimpleName()));
+ Assert.assertThat(TestSimpleJob.getShardingContext().getShardingTotalCount(), Is.is(3));
+ Assert.assertThat(TestSimpleJob.getShardingContext().getJobParameter(), Is.is("dbName=dangdang"));
+ Assert.assertThat(TestSimpleJob.getShardingContext().getShardingItem(), Is.is(1));
+ Assert.assertThat(TestSimpleJob.getShardingParameters().size(), Is.is(1));
+ Assert.assertThat(TestSimpleJob.getShardingParameters().iterator().next(), Is.is("Shanghai"));
}
@Test
@@ -79,9 +75,9 @@ public final class LocalTaskExecutorTest {
TestDataflowJob.setInput(Arrays.asList("1", "2", "3"));
new LocalTaskExecutor(new LocalCloudJobConfiguration(new DataflowJobConfiguration(JobCoreConfiguration
.newBuilder(TestDataflowJob.class.getSimpleName(), "*/2 * * * * ?", 10).build(), TestDataflowJob.class.getName(), false), 5)).execute();
- assertFalse(TestDataflowJob.getOutput().isEmpty());
+ Assert.assertFalse(TestDataflowJob.getOutput().isEmpty());
for (String each : TestDataflowJob.getOutput()) {
- assertTrue(each.endsWith("-d"));
+ Assert.assertTrue(each.endsWith("-d"));
}
}
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/fixture/TestDataflowJob.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/fixture/TestDataflowJob.java
index 7d72e0c..9f8fac7 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/fixture/TestDataflowJob.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/fixture/TestDataflowJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.local.fixture;
diff --git a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/fixture/TestSimpleJob.java b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/fixture/TestSimpleJob.java
index 11abb26..73cce56 100644
--- a/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/fixture/TestSimpleJob.java
+++ b/elastic-job-cloud-executor/src/test/java/io/elasticjob/cloud/executor/local/fixture/TestSimpleJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.executor.local.fixture;
diff --git a/elastic-job-cloud-executor/src/test/resources/applicationContext.xml b/elastic-job-cloud-executor/src/test/resources/applicationContext.xml
index 3fb8979..fff7a23 100644
--- a/elastic-job-cloud-executor/src/test/resources/applicationContext.xml
+++ b/elastic-job-cloud-executor/src/test/resources/applicationContext.xml
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ 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.
+ -->
+
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
diff --git a/elastic-job-cloud-executor/src/test/resources/logback-test.xml b/elastic-job-cloud-executor/src/test/resources/logback-test.xml
index a5ee1ef..ef40def 100644
--- a/elastic-job-cloud-executor/src/test/resources/logback-test.xml
+++ b/elastic-job-cloud-executor/src/test/resources/logback-test.xml
@@ -1,4 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
<configuration>
<property name="log.context.name" value="elastic-job-cloud-executor" />
<property name="log.charset" value="UTF-8" />
diff --git a/elastic-job-cloud-scheduler/pom.xml b/elastic-job-cloud-scheduler/pom.xml
index c0a5872..2f09a2f 100644
--- a/elastic-job-cloud-scheduler/pom.xml
+++ b/elastic-job-cloud-scheduler/pom.xml
@@ -1,21 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>elastic-job-cloud</artifactId>
- <groupId>io.elasticjob</groupId>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
<version>3.0.0.M1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>elastic-job-cloud-scheduler</artifactId>
<name>${project.artifactId}</name>
- <properties>
- <maven-assembly-plugin.version>2.5.5</maven-assembly-plugin.version>
- </properties>
-
<dependencies>
<dependency>
- <groupId>io.elasticjob</groupId>
+ <groupId>org.apache.shardingsphere.elasticjob</groupId>
<artifactId>elastic-job-cloud-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
@@ -131,7 +144,7 @@
<execution>
<phase>package</phase>
<goals>
- <goal>assembly</goal>
+ <goal>single</goal>
</goals>
</execution>
</executions>
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/GsonJsonProvider.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/GsonJsonProvider.java
index d52f68f..eb21b2a 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/GsonJsonProvider.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/GsonJsonProvider.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.restful;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulException.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulException.java
index 0768b73..8f0f7b6 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulException.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulException.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.restful;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulExceptionMapper.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulExceptionMapper.java
index 6f5fc83..20e6706 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulExceptionMapper.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulExceptionMapper.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.restful;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulServer.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulServer.java
index ae17748..6a290af 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulServer.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/restful/RestfulServer.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.restful;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/Bootstrap.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/Bootstrap.java
index c428973..4b738a5 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/Bootstrap.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/Bootstrap.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfiguration.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfiguration.java
index e0033e4..46cbc06 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfiguration.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.app;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationGsonFactory.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationGsonFactory.java
index 2a38552..4244a8b 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationGsonFactory.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationGsonFactory.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,11 +13,11 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.app;
+import io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationConstants;
import io.elasticjob.cloud.util.json.GsonFactory;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
@@ -26,14 +27,6 @@ import lombok.NoArgsConstructor;
import java.io.IOException;
-import static io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationConstants.APP_CACHE_ENABLE;
-import static io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationConstants.APP_NAME;
-import static io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationConstants.APP_URL;
-import static io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationConstants.BOOTSTRAP_SCRIPT;
-import static io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationConstants.CPU_COUNT;
-import static io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationConstants.EVENT_TRACE_SAMPLING_COUNT;
-import static io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationConstants.MEMORY_MB;
-
/**
* 云作业App配置的Gson工厂.
*
@@ -42,7 +35,7 @@ import static io.elasticjob.cloud.scheduler.config.constants.CloudConfigurationC
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class CloudAppConfigurationGsonFactory {
- static {
+ static {
GsonFactory.registerTypeAdapter(CloudAppConfiguration.class, new CloudAppConfigurationGsonTypeAdapter());
}
@@ -86,25 +79,25 @@ public final class CloudAppConfigurationGsonFactory {
while (in.hasNext()) {
String jsonName = in.nextName();
switch (jsonName) {
- case APP_NAME:
+ case CloudConfigurationConstants.APP_NAME:
appName = in.nextString();
break;
- case APP_URL:
+ case CloudConfigurationConstants.APP_URL:
appURL = in.nextString();
break;
- case BOOTSTRAP_SCRIPT:
+ case CloudConfigurationConstants.BOOTSTRAP_SCRIPT:
bootstrapScript = in.nextString();
break;
- case CPU_COUNT:
+ case CloudConfigurationConstants.CPU_COUNT:
cpuCount = in.nextDouble();
break;
- case MEMORY_MB:
+ case CloudConfigurationConstants.MEMORY_MB:
memoryMB = in.nextDouble();
break;
- case APP_CACHE_ENABLE:
+ case CloudConfigurationConstants.APP_CACHE_ENABLE:
appCacheEnable = in.nextBoolean();
break;
- case EVENT_TRACE_SAMPLING_COUNT:
+ case CloudConfigurationConstants.EVENT_TRACE_SAMPLING_COUNT:
eventTraceSamplingCount = in.nextInt();
break;
default:
@@ -118,13 +111,13 @@ public final class CloudAppConfigurationGsonFactory {
@Override
public void write(final JsonWriter out, final CloudAppConfiguration value) throws IOException {
out.beginObject();
- out.name(APP_NAME).value(value.getAppName());
- out.name(APP_URL).value(value.getAppURL());
- out.name(BOOTSTRAP_SCRIPT).value(value.getBootstrapScript());
- out.name(CPU_COUNT).value(value.getCpuCount());
- out.name(MEMORY_MB).value(value.getMemoryMB());
- out.name(APP_CACHE_ENABLE).value(value.isAppCacheEnable());
- out.name(EVENT_TRACE_SAMPLING_COUNT).value(value.getEventTraceSamplingCount());
+ out.name(CloudConfigurationConstants.APP_NAME).value(value.getAppName());
+ out.name(CloudConfigurationConstants.APP_URL).value(value.getAppURL());
+ out.name(CloudConfigurationConstants.BOOTSTRAP_SCRIPT).value(value.getBootstrapScript());
+ out.name(CloudConfigurationConstants.CPU_COUNT).value(value.getCpuCount());
+ out.name(CloudConfigurationConstants.MEMORY_MB).value(value.getMemoryMB());
+ out.name(CloudConfigurationConstants.APP_CACHE_ENABLE).value(value.isAppCacheEnable());
+ out.name(CloudConfigurationConstants.EVENT_TRACE_SAMPLING_COUNT).value(value.getEventTraceSamplingCount());
out.endObject();
}
}
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationNode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationNode.java
index ce867ba..d0e863a 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationNode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.app;
@@ -28,9 +28,9 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class CloudAppConfigurationNode {
- public static final String ROOT = "/config/app";
+ public static final String ROOT = "/config/app";
- private static final String APP_CONFIG = ROOT + "/%s";
+ private static final String APP_CONFIG = ROOT + "/%s";
static String getRootNodePath(final String appName) {
return String.format(APP_CONFIG, appName);
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationService.java
index a81d1ef..e1252ba 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/app/CloudAppConfigurationService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.app;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/constants/CloudConfigurationConstants.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/constants/CloudConfigurationConstants.java
index c5c6c01..f977adf 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/constants/CloudConfigurationConstants.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/constants/CloudConfigurationConstants.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.constants;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfiguration.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfiguration.java
index 10e488d..224b96b 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfiguration.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationGsonFactory.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationGsonFactory.java
index 9e4d6b6..2f54ed0 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationGsonFactory.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationGsonFactory.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.job;
@@ -39,7 +39,7 @@ import java.util.Map;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class CloudJobConfigurationGsonFactory {
- static {
+ static {
GsonFactory.registerTypeAdapter(CloudJobConfiguration.class, new CloudJobConfigurationGsonTypeAdapter());
}
@@ -98,12 +98,16 @@ public final class CloudJobConfigurationGsonFactory {
Preconditions.checkArgument((double) customizedValueMap.get(CloudConfigurationConstants.MEMORY_MB) >= 1, "memory cannot be less than 1");
Preconditions.checkNotNull(customizedValueMap.get(CloudConfigurationConstants.JOB_EXECUTION_TYPE), "jobExecutionType cannot be null.");
if (customizedValueMap.containsKey(CloudConfigurationConstants.BEAN_NAME) && customizedValueMap.containsKey(CloudConfigurationConstants.APPLICATION_CONTEXT)) {
- return new CloudJobConfiguration((String) customizedValueMap.get(CloudConfigurationConstants.APP_NAME), typeConfig, (double) customizedValueMap.get(CloudConfigurationConstants.CPU_COUNT),
- (double) customizedValueMap.get(CloudConfigurationConstants.MEMORY_MB), CloudJobExecutionType.valueOf(customizedValueMap.get(CloudConfigurationConstants.JOB_EXECUTION_TYPE).toString()),
+ return new CloudJobConfiguration((String) customizedValueMap.get(CloudConfigurationConstants.APP_NAME), typeConfig,
+ (double) customizedValueMap.get(CloudConfigurationConstants.CPU_COUNT),
+ (double) customizedValueMap.get(CloudConfigurationConstants.MEMORY_MB),
+ CloudJobExecutionType.valueOf(customizedValueMap.get(CloudConfigurationConstants.JOB_EXECUTION_TYPE).toString()),
customizedValueMap.get(CloudConfigurationConstants.BEAN_NAME).toString(), customizedValueMap.get(CloudConfigurationConstants.APPLICATION_CONTEXT).toString());
} else {
- return new CloudJobConfiguration((String) customizedValueMap.get(CloudConfigurationConstants.APP_NAME), typeConfig, (double) customizedValueMap.get(CloudConfigurationConstants.CPU_COUNT),
- (double) customizedValueMap.get(CloudConfigurationConstants.MEMORY_MB), CloudJobExecutionType.valueOf(customizedValueMap.get(CloudConfigurationConstants.JOB_EXECUTION_TYPE).toString()));
+ return new CloudJobConfiguration((String) customizedValueMap.get(CloudConfigurationConstants.APP_NAME), typeConfig,
+ (double) customizedValueMap.get(CloudConfigurationConstants.CPU_COUNT),
+ (double) customizedValueMap.get(CloudConfigurationConstants.MEMORY_MB),
+ CloudJobExecutionType.valueOf(customizedValueMap.get(CloudConfigurationConstants.JOB_EXECUTION_TYPE).toString()));
}
}
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationListener.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationListener.java
index b86e423..f32f1ad 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationListener.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationListener.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationNode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationNode.java
index 2fc4bef..2bdb6e6 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationNode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.job;
@@ -28,9 +28,9 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class CloudJobConfigurationNode {
- public static final String ROOT = "/config/job";
+ public static final String ROOT = "/config/job";
- private static final String JOB_CONFIG = ROOT + "/%s";
+ private static final String JOB_CONFIG = ROOT + "/%s";
static String getRootNodePath(final String jobName) {
return String.format(JOB_CONFIG, jobName);
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationService.java
index 6f05814..c7b15a0 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobConfigurationService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobExecutionType.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobExecutionType.java
index 08623a3..9f3f735 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobExecutionType.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/config/job/CloudJobExecutionType.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.config.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/context/JobContext.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/context/JobContext.java
index e476051..2d481c1 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/context/JobContext.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/context/JobContext.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.context;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/BootstrapEnvironment.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/BootstrapEnvironment.java
index c2c32ab..e84cc31 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/BootstrapEnvironment.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/BootstrapEnvironment.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.env;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/FrameworkConfiguration.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/FrameworkConfiguration.java
index 1a1cec1..1c218c0 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/FrameworkConfiguration.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/FrameworkConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.env;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/MesosConfiguration.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/MesosConfiguration.java
index 5742ad6..7d187d7 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/MesosConfiguration.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/MesosConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.env;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/RestfulServerConfiguration.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/RestfulServerConfiguration.java
index 357dd69..aab19a8 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/RestfulServerConfiguration.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/env/RestfulServerConfiguration.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.env;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/FrameworkIDService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/FrameworkIDService.java
index 48b03d4..dbc9188 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/FrameworkIDService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/FrameworkIDService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.ha;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/HANode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/HANode.java
index 5865005..4239621 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/HANode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/HANode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.ha;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/SchedulerElectionCandidate.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/SchedulerElectionCandidate.java
index 69d9aa5..63c1d9a 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/SchedulerElectionCandidate.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/ha/SchedulerElectionCandidate.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.ha;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/AppConstraintEvaluator.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/AppConstraintEvaluator.java
index ac24567..4b197aa 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/AppConstraintEvaluator.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/AppConstraintEvaluator.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/FacadeService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/FacadeService.java
index 647fec7..c8381d8 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/FacadeService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/FacadeService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
@@ -332,6 +332,7 @@ public final class FacadeService {
* 获取所有正在运行的Executor的信息.
*
* @return Executor信息集合
+ * @throws JSONException json exception
*/
public Collection<MesosStateService.ExecutorStateInfo> loadExecutorInfo() throws JSONException {
return mesosStateService.executors();
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/JobTaskRequest.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/JobTaskRequest.java
index f2c13e6..1366131 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/JobTaskRequest.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/JobTaskRequest.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/LaunchingTasks.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/LaunchingTasks.java
index 2e3b5b0..db8b20e 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/LaunchingTasks.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/LaunchingTasks.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/LeasesQueue.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/LeasesQueue.java
index 824b1be..d239de7 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/LeasesQueue.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/LeasesQueue.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/MesosStateService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/MesosStateService.java
index c53bcc4..ec0f8ef 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/MesosStateService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/MesosStateService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/ReconcileService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/ReconcileService.java
index 08a03e9..0a3dc84 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/ReconcileService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/ReconcileService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SchedulerEngine.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SchedulerEngine.java
index eefb38c..974fb12 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SchedulerEngine.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SchedulerEngine.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SchedulerService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SchedulerService.java
index 6ec0e49..0944d99 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SchedulerService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SchedulerService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
@@ -76,7 +76,7 @@ public final class SchedulerService {
JobEventBus jobEventBus = getJobEventBus();
schedulerDriver = getSchedulerDriver(taskScheduler, jobEventBus, new FrameworkIDService(regCenter));
producerManager = new ProducerManager(schedulerDriver, regCenter);
- cloudJobConfigurationListener = new CloudJobConfigurationListener(regCenter, producerManager);
+ cloudJobConfigurationListener = new CloudJobConfigurationListener(regCenter, producerManager);
taskLaunchScheduledService = new TaskLaunchScheduledService(schedulerDriver, taskScheduler, facadeService, jobEventBus);
reconcileService = new ReconcileService(schedulerDriver, facadeService);
restfulService = new RestfulService(regCenter, env.getRestfulServerConfiguration(), producerManager, reconcileService);
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SupportedExtractionType.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SupportedExtractionType.java
index fc0b18b..f175f44 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SupportedExtractionType.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/SupportedExtractionType.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/TaskInfoData.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/TaskInfoData.java
index b36da03..d3d46ac 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/TaskInfoData.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/TaskInfoData.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
@@ -47,10 +47,10 @@ public final class TaskInfoData {
* @return 序列化后的字节数组
*/
public byte[] serialize() {
- LinkedHashMap<String, Object> result = new LinkedHashMap<>(2, 1);
+ Map<String, Object> result = new LinkedHashMap<>(2, 1);
result.put("shardingContext", shardingContexts);
result.put("jobConfigContext", buildJobConfigurationContext());
- return SerializationUtils.serialize(result);
+ return SerializationUtils.serialize((LinkedHashMap) result);
}
private Map<String, String> buildJobConfigurationContext() {
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/TaskLaunchScheduledService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/TaskLaunchScheduledService.java
index fe9eb6e..2695947 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/TaskLaunchScheduledService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/mesos/TaskLaunchScheduledService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.mesos;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/ProducerManager.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/ProducerManager.java
index b611921..003ba86 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/ProducerManager.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/ProducerManager.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.producer;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/TransientProducerRepository.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/TransientProducerRepository.java
index 2e15f82..936e82c 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/TransientProducerRepository.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/TransientProducerRepository.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.producer;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/TransientProducerScheduler.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/TransientProducerScheduler.java
index bd54084..18213ab 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/TransientProducerScheduler.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/producer/TransientProducerScheduler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.producer;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudAppRestfulApi.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudAppRestfulApi.java
index 676629d..36df778 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudAppRestfulApi.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudAppRestfulApi.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.restful;
@@ -46,8 +46,6 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.Collection;
-import static javax.ws.rs.core.Response.Status.NOT_FOUND;
-
/**
* 云作业应用的REST API.
*
@@ -125,7 +123,7 @@ public final class CloudAppRestfulApi {
public Response detail(@PathParam("appName") final String appName) {
Optional<CloudAppConfiguration> appConfig = appConfigService.load(appName);
if (!appConfig.isPresent()) {
- return Response.status(NOT_FOUND).build();
+ return Response.status(Response.Status.NOT_FOUND).build();
}
return Response.ok(appConfig.get()).build();
}
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudJobRestfulApi.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudJobRestfulApi.java
index e361d4b..5e9d694 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudJobRestfulApi.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudJobRestfulApi.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.restful;
@@ -73,8 +73,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import static javax.ws.rs.core.Response.Status.NOT_FOUND;
-
/**
* 作业云Job的REST API.
*
@@ -231,7 +229,7 @@ public final class CloudJobRestfulApi {
public Response detail(@PathParam("jobName") final String jobName) {
Optional<CloudJobConfiguration> jobConfig = configService.load(jobName);
if (!jobConfig.isPresent()) {
- return Response.status(NOT_FOUND).build();
+ return Response.status(Response.Status.NOT_FOUND).build();
}
return Response.ok(jobConfig.get()).build();
}
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudOperationRestfulApi.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudOperationRestfulApi.java
index 3e99db8..b0bc957 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudOperationRestfulApi.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/CloudOperationRestfulApi.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.restful;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/RestfulService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/RestfulService.java
index 6d42275..53e23fa 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/RestfulService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/restful/RestfulService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.restful;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/StateNode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/StateNode.java
index 06f470f..2fb9d11 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/StateNode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/StateNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/app/DisableAppNode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/app/DisableAppNode.java
index d9810f0..9af6943 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/app/DisableAppNode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/app/DisableAppNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.disable.app;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/app/DisableAppService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/app/DisableAppService.java
index cbda018..d8846ed 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/app/DisableAppService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/app/DisableAppService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.disable.app;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/job/DisableJobNode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/job/DisableJobNode.java
index b323282..4aa7d04 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/job/DisableJobNode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/job/DisableJobNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.disable.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/job/DisableJobService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/job/DisableJobService.java
index 31d95b9..978d954 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/job/DisableJobService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/disable/job/DisableJobService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.disable.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverNode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverNode.java
index 3738e42..e5defe3 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverNode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.failover;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverService.java
index 6b19710..25480cb 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.failover;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverTaskInfo.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverTaskInfo.java
index be44270..090944d 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverTaskInfo.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/failover/FailoverTaskInfo.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.failover;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/ready/ReadyNode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/ready/ReadyNode.java
index 2778d42..6c99066 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/ready/ReadyNode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/ready/ReadyNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.ready;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/ready/ReadyService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/ready/ReadyService.java
index 660f7be..2756635 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/ready/ReadyService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/ready/ReadyService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.ready;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/running/RunningNode.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/running/RunningNode.java
index f88b5b9..f75866d 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/running/RunningNode.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/running/RunningNode.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.running;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/running/RunningService.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/running/RunningService.java
index 7cd9d28..c554a53 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/running/RunningService.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/state/running/RunningService.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.state.running;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/StatisticManager.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/StatisticManager.java
index 9d37967..99c0320 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/StatisticManager.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/StatisticManager.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/StatisticsScheduler.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/StatisticsScheduler.java
index fdd6a97..7767dc9 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/StatisticsScheduler.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/StatisticsScheduler.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/TaskResultMetaData.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/TaskResultMetaData.java
index 1d8de18..d8840d5 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/TaskResultMetaData.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/TaskResultMetaData.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/AbstractStatisticJob.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/AbstractStatisticJob.java
index a2f966e..52b6c38 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/AbstractStatisticJob.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/AbstractStatisticJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/JobRunningStatisticJob.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/JobRunningStatisticJob.java
index 56f42a7..ac3dc0b 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/JobRunningStatisticJob.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/JobRunningStatisticJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/RegisteredJobStatisticJob.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/RegisteredJobStatisticJob.java
index bca23f0..041bdf6 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/RegisteredJobStatisticJob.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/RegisteredJobStatisticJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/StatisticJob.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/StatisticJob.java
index ed20b98..6470abf 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/StatisticJob.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/StatisticJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/TaskResultStatisticJob.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/TaskResultStatisticJob.java
index d95a5a8..e7f78da 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/TaskResultStatisticJob.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/job/TaskResultStatisticJob.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics.job;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/util/StatisticTimeUtils.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/util/StatisticTimeUtils.java
index 0e412f1..c4ea064 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/util/StatisticTimeUtils.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/scheduler/statistics/util/StatisticTimeUtils.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.scheduler.statistics.util;
diff --git a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/security/WwwAuthFilter.java b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/security/WwwAuthFilter.java
index 7a0d2c0..4bee83b 100644
--- a/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/security/WwwAuthFilter.java
+++ b/elastic-job-cloud-scheduler/src/main/java/io/elasticjob/cloud/security/WwwAuthFilter.java
@@ -1,9 +1,10 @@
/*
- * Copyright 1999-2015 dangdang.com.
- * <p>
- * Licensed 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
+ * 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
*
@@ -12,7 +13,6 @@
* 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.
- * </p>
*/
package io.elasticjob.cloud.security;
@@ -58,7 +58,6 @@ public final class WwwAuthFilter implements Filter {
private static final String GUEST_DEFAULT_PASSWORD = "guest";
-
private String rootUsername;
private String rootPassword;
diff --git a/elastic-job-cloud-scheduler/src/main/resources/assembly/assembly.xml b/elastic-job-cloud-scheduler/src/main/resources/assembly/assembly.xml
index 4d4fca7..c376aae 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/assembly/assembly.xml
+++ b/elastic-job-cloud-scheduler/src/main/resources/assembly/assembly.xml
@@ -1,4 +1,22 @@
+<!--
+ ~ 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.
+ -->
+
<assembly>
+ <id>scheduler-bin</id>
<formats>
<format>tar.gz</format>
</formats>
diff --git a/elastic-job-cloud-scheduler/src/main/resources/conf/auth.properties b/elastic-job-cloud-scheduler/src/main/resources/conf/auth.properties
index 9e7cb9a..0a9fee6 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/conf/auth.properties
+++ b/elastic-job-cloud-scheduler/src/main/resources/conf/auth.properties
@@ -1,3 +1,20 @@
+#
+# 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.
+#
+
root.username=root
root.password=root
guest.username=guest
diff --git a/elastic-job-cloud-scheduler/src/main/resources/conf/elastic-job-cloud-scheduler.properties b/elastic-job-cloud-scheduler/src/main/resources/conf/elastic-job-cloud-scheduler.properties
index 73358e8..110fb21 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/conf/elastic-job-cloud-scheduler.properties
+++ b/elastic-job-cloud-scheduler/src/main/resources/conf/elastic-job-cloud-scheduler.properties
@@ -1,3 +1,20 @@
+#
+# 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.
+#
+
# Routable IP address
hostname=127.0.0.1
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/css/common.css b/elastic-job-cloud-scheduler/src/main/resources/console/css/common.css
index 9a1a3a6..6129972 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/css/common.css
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/css/common.css
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
.form-group.toolbar label {
float: left;
width: 130px;
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/app/add_app.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/app/add_app.html
index 3b17528..6bfe0b9 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/app/add_app.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/app/add_app.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="box-body">
<div role="tabpanel" class="tab-pane active" onsubmit="return false;">
<form id="app-form" class="form-horizontal">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/app/apps_overview.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/app/apps_overview.html
index 84c0aaa..1ba3afd 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/app/apps_overview.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/app/apps_overview.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="content-wrapper">
<div class="page-height-min">
<section class="content-header">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/app/detail_app.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/app/detail_app.html
index e9ef84d..90db633 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/app/detail_app.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/app/detail_app.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="box-body">
<div role="tabpanel" class="tab-pane active" onsubmit="return false;">
<form id="app-form" class="form-horizontal">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/app/modify_app.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/app/modify_app.html
index b37c3f1..a1d0017 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/app/modify_app.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/app/modify_app.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="box-body">
<div role="tabpanel" class="tab-pane active" onsubmit="return false;">
<form id="app-form" class="form-horizontal">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_dashboard.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_dashboard.html
index 2855c3c..09ea53c 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_dashboard.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_dashboard.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="content-wrapper">
<section class="content-header">
<h1 data-lang="sidebar-job-dashboard"></h1>
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_details.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_details.html
index ed49fea..d97e756 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_details.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_details.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="content-wrapper">
<div class="page-height-min">
<section class="content-header">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_status.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_status.html
index 85ed4cb..5a31b46 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_status.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/history/job_exec_status.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="content-wrapper">
<div class="page-height-min">
<section class="content-header">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/add_job.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/add_job.html
index 8e6561b..81c01b3 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/add_job.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/add_job.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="box-body">
<div role="tabpanel" class="tab-pane active" onsubmit="return false;">
<form id="job-form" class="form-horizontal">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/detail_job.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/detail_job.html
index 022bd72..f1a8e9b 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/detail_job.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/detail_job.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="box-body">
<div role="tabpanel" class="tab-pane active" onsubmit="return false;">
<form id="job-form" class="form-horizontal">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/job_status.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/job_status.html
index ea76b7d..b0fc8af 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/job_status.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/job_status.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="content-wrapper">
<div class="page-height-min">
<section class="content-header">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/jobs_overview.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/jobs_overview.html
index 5641634..6821761 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/jobs_overview.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/jobs_overview.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="content-wrapper">
<div class="page-height-min">
<section class="content-header">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/modify_job.html b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/modify_job.html
index a4441da..c939906 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/html/job/modify_job.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/html/job/modify_job.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<div class="box-body">
<div role="tabpanel" class="tab-pane active" onsubmit="return false;">
<form id="job-form" class="form-horizontal">
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message.properties b/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message.properties
index e69de29..b1312a0 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message.properties
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message.properties
@@ -0,0 +1,16 @@
+#
+# 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.
+#
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message_en.properties b/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message_en.properties
index c9d2980..248a516 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message_en.properties
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message_en.properties
@@ -1,3 +1,20 @@
+#
+# 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.
+#
+
sidebar-app=App
sidebar-config=Config
sidebar-job=Job
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message_zh.properties b/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message_zh.properties
index 5504958..221a316 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message_zh.properties
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/i18n/message_zh.properties
@@ -1,3 +1,20 @@
+#
+# 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.
+#
+
sidebar-app=应用
sidebar-config=配置
sidebar-job=作业
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/index.html b/elastic-job-cloud-scheduler/src/main/resources/console/index.html
index c45b102..be21d55 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/index.html
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/index.html
@@ -1,3 +1,20 @@
+<!--
+ ~ 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.
+ -->
+
<!DOCTYPE html>
<html>
<head>
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/app/add_app.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/app/add_app.js
index 03cd792..cfab18c 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/app/add_app.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/app/add_app.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
validate();
submitConfirm("post", $("#data-add-app"));
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/app/app_common.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/app/app_common.js
index a0d9937..17d8d6c 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/app/app_common.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/app/app_common.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
function validate() {
$("#app-form").bootstrapValidator({
message: "This value is not valid",
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/app/apps_overview.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/app/apps_overview.js
index 0c9f2ad..8778773 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/app/apps_overview.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/app/apps_overview.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
authorityControl();
renderAppOverview();
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/app/modify_app.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/app/modify_app.js
index 01f53a4..cdcc294 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/app/modify_app.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/app/modify_app.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
validate();
submitConfirm("put", $("#data-update-app"));
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/common/common.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/common/common.js
index 18e0ae3..28b1bc3 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/common/common.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/common/common.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
renderSkin();
controlSubMenuStyle();
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/history/history_common.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/history/history_common.js
index b8d87b4..fedc526 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/history/history_common.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/history/history_common.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
$customDatepicker = $(".custom-datepicker");
$customDatepicker.daterangepicker({singleDatePicker : true, timePicker : true, timePicker24Hour : true, timePickerSeconds : true, autoUpdateInput : false});
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_dashboard.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_dashboard.js
index 0e5fb7d..4d7c993 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_dashboard.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_dashboard.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
doLocale();
renderPieChartSinceLastMinuteData();
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_details.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_details.js
index 733e649..c3cc9bf 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_details.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_details.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
$("[data-mask]").inputmask();
$(".toolbar input").bind("keypress", function(event) {
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_status.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_status.js
index e5e161f..05aafa7 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_status.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/history/job_exec_status.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
$(".toolbar input").bind("keypress", function(event) {
if("13" == event.keyCode) {
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/index.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/index.js
index ae508bc..4a5731e 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/index.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/index.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
$("#content-right").load("/html/app/apps_overview.html");
refreshJobNavTag();
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/job/add_job.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/job/add_job.js
index c4be5ee..add1d25 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/job/add_job.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/job/add_job.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
validate();
dataControl();
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/job/job_common.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/job/job_common.js
index 0f3a962..dd9c172 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/job/job_common.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/job/job_common.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
function validate() {
$("#job-form").bootstrapValidator({
message: "This value is not valid",
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/job/jobs_overview.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/job/jobs_overview.js
index 3354367..4b571b7 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/job/jobs_overview.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/job/jobs_overview.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
$(function() {
authorityControl();
renderJobOverview();
diff --git a/elastic-job-cloud-scheduler/src/main/resources/console/js/job/modify_job.js b/elastic-job-cloud-scheduler/src/main/resources/console/js/job/modify_job.js
index 9a3f596..c45cf23 100644
--- a/elastic-job-cloud-scheduler/src/main/resources/console/js/job/modify_job.js
+++ b/elastic-job-cloud-scheduler/src/main/resources/console/js/job/modify_job.js
@@ -1,3 +1,20 @@
+/*
+ * 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.
... 7144 lines suppressed ...