Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename elasticjob-lifecycle module name #2296

Merged
merged 2 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/content/user-manual/usage/operation-api/_index.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ElasticJob 提供了 Java API,可以通过直接对注册中心进行操作的

## 配置类 API

类名称:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobConfigurationAPI`
类名称:`org.apache.shardingsphere.elasticjob.lifecycle.api.JobConfigurationAPI`

### 获取作业配置

Expand All @@ -37,7 +37,7 @@ ElasticJob 提供了 Java API,可以通过直接对注册中心进行操作的

## 操作类 API

类名称:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobOperateAPI`
类名称:`org.apache.shardingsphere.elasticjob.lifecycle.api.JobOperateAPI`

### 触发作业执行

Expand Down Expand Up @@ -85,7 +85,7 @@ ElasticJob 提供了 Java API,可以通过直接对注册中心进行操作的

## 操作分片的 API

类名称:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ShardingOperateAPI`
类名称:`org.apache.shardingsphere.elasticjob.lifecycle.api.ShardingOperateAPI`

### 禁用作业分片

Expand All @@ -105,7 +105,7 @@ ElasticJob 提供了 Java API,可以通过直接对注册中心进行操作的

## 作业统计 API

类名称:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobStatisticsAPI`
类名称:`org.apache.shardingsphere.elasticjob.lifecycle.api.JobStatisticsAPI`

### 获取作业总数

Expand Down Expand Up @@ -139,7 +139,7 @@ ElasticJob 提供了 Java API,可以通过直接对注册中心进行操作的

## 作业服务器状态展示 API

类名称:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ServerStatisticsAPI`
类名称:`org.apache.shardingsphere.elasticjob.lifecycle.api.ServerStatisticsAPI`

### 获取作业服务器总数

Expand All @@ -155,7 +155,7 @@ ElasticJob 提供了 Java API,可以通过直接对注册中心进行操作的

## 作业分片状态展示 API

类名称:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ShardingStatisticsAPI`
类名称:`org.apache.shardingsphere.elasticjob.lifecycle.api.ShardingStatisticsAPI`

### 获取作业分片信息集合

Expand Down
12 changes: 6 additions & 6 deletions docs/content/user-manual/usage/operation-api/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The module is still in incubation.

## Configuration API

Class name: `org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobConfigurationAPI`
Class name: `org.apache.shardingsphere.elasticjob.lifecycle.api.JobConfigurationAPI`

### Get job configuration

Expand All @@ -37,7 +37,7 @@ Method signature:void removeJobConfiguration(String jobName)

## Operation API

Class name:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobOperateAPI`
Class name:`org.apache.shardingsphere.elasticjob.lifecycle.api.JobOperateAPI`

### Trigger job execution

Expand Down Expand Up @@ -85,7 +85,7 @@ Method signature:void remove(Optional<String> jobName, Optional<String> server

## Operate sharding API

Class name:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ShardingOperateAPI`
Class name:`org.apache.shardingsphere.elasticjob.lifecycle.api.ShardingOperateAPI`

### Disable job sharding

Expand All @@ -105,7 +105,7 @@ Method signature:void enable(String jobName, String item)

## Job statistics API

Class name:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobStatisticsAPI`
Class name:`org.apache.shardingsphere.elasticjob.lifecycle.api.JobStatisticsAPI`

### Get the total count of jobs

Expand Down Expand Up @@ -139,7 +139,7 @@ Method signature:Collection<JobBriefInfo> getJobsBriefInfo(String ip)

## Job server status display API

Class name:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ServerStatisticsAPI`
Class name:`org.apache.shardingsphere.elasticjob.lifecycle.api.ServerStatisticsAPI`

### Total count of job servers

Expand All @@ -155,7 +155,7 @@ Method signature:Collection<ServerBriefInfo> getAllServersBriefInfo()

## Job sharding status display API

Class name:`org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ShardingStatisticsAPI`
Class name:`org.apache.shardingsphere.elasticjob.lifecycle.api.ShardingStatisticsAPI`

### Get job sharding information collection

Expand Down
2 changes: 1 addition & 1 deletion lifecycle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<artifactId>elasticjob</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<artifactId>elasticjob-engine-lifecycle</artifactId>
<artifactId>elasticjob-lifecycle</artifactId>
<name>${project.artifactId}</name>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.api;
package org.apache.shardingsphere.elasticjob.lifecycle.api;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.operate.JobOperateAPIImpl;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.operate.ShardingOperateAPIImpl;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.reg.RegistryCenterFactory;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.settings.JobConfigurationAPIImpl;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.statistics.JobStatisticsAPIImpl;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.statistics.ServerStatisticsAPIImpl;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.statistics.ShardingStatisticsAPIImpl;
import org.apache.shardingsphere.elasticjob.lifecycle.internal.operate.JobOperateAPIImpl;
import org.apache.shardingsphere.elasticjob.lifecycle.internal.operate.ShardingOperateAPIImpl;
import org.apache.shardingsphere.elasticjob.lifecycle.internal.reg.RegistryCenterFactory;
import org.apache.shardingsphere.elasticjob.lifecycle.internal.settings.JobConfigurationAPIImpl;
import org.apache.shardingsphere.elasticjob.lifecycle.internal.statistics.JobStatisticsAPIImpl;
import org.apache.shardingsphere.elasticjob.lifecycle.internal.statistics.ServerStatisticsAPIImpl;
import org.apache.shardingsphere.elasticjob.lifecycle.internal.statistics.ShardingStatisticsAPIImpl;

/**
* Job API factory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.api;
package org.apache.shardingsphere.elasticjob.lifecycle.api;

import org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.api;
package org.apache.shardingsphere.elasticjob.lifecycle.api;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.api;
package org.apache.shardingsphere.elasticjob.lifecycle.api;

import org.apache.shardingsphere.elasticjob.engine.lifecycle.domain.JobBriefInfo;
import org.apache.shardingsphere.elasticjob.lifecycle.domain.JobBriefInfo;

import java.util.Collection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.api;
package org.apache.shardingsphere.elasticjob.lifecycle.api;

import org.apache.shardingsphere.elasticjob.engine.lifecycle.domain.ServerBriefInfo;
import org.apache.shardingsphere.elasticjob.lifecycle.domain.ServerBriefInfo;

import java.util.Collection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.api;
package org.apache.shardingsphere.elasticjob.lifecycle.api;

/**
* Sharding operate API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.api;
package org.apache.shardingsphere.elasticjob.lifecycle.api;

import org.apache.shardingsphere.elasticjob.engine.lifecycle.domain.ShardingInfo;
import org.apache.shardingsphere.elasticjob.lifecycle.domain.ShardingInfo;

import java.util.Collection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.domain;
package org.apache.shardingsphere.elasticjob.lifecycle.domain;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.domain;
package org.apache.shardingsphere.elasticjob.lifecycle.domain;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.domain;
package org.apache.shardingsphere.elasticjob.lifecycle.domain;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.operate;
package org.apache.shardingsphere.elasticjob.lifecycle.internal.operate;

import com.google.common.base.Preconditions;
import org.apache.shardingsphere.elasticjob.infra.handler.sharding.JobInstance;
Expand All @@ -24,7 +24,7 @@
import org.apache.shardingsphere.elasticjob.engine.internal.server.ServerStatus;
import org.apache.shardingsphere.elasticjob.engine.internal.snapshot.SnapshotService;
import org.apache.shardingsphere.elasticjob.engine.internal.storage.JobNodePath;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobOperateAPI;
import org.apache.shardingsphere.elasticjob.lifecycle.api.JobOperateAPI;
import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.operate;
package org.apache.shardingsphere.elasticjob.lifecycle.internal.operate;

import org.apache.shardingsphere.elasticjob.engine.internal.storage.JobNodePath;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ShardingOperateAPI;
import org.apache.shardingsphere.elasticjob.lifecycle.api.ShardingOperateAPI;
import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.reg;
package org.apache.shardingsphere.elasticjob.lifecycle.internal.reg;

import com.google.common.base.Strings;
import com.google.common.hash.HashCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.settings;
package org.apache.shardingsphere.elasticjob.lifecycle.internal.settings;

import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO;
import org.apache.shardingsphere.elasticjob.engine.internal.storage.JobNodePath;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobConfigurationAPI;
import org.apache.shardingsphere.elasticjob.lifecycle.api.JobConfigurationAPI;
import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
import org.apache.shardingsphere.elasticjob.infra.yaml.YamlEngine;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.statistics;
package org.apache.shardingsphere.elasticjob.lifecycle.internal.statistics;

import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.elasticjob.api.JobConfiguration;
import org.apache.shardingsphere.elasticjob.infra.handler.sharding.JobInstance;
import org.apache.shardingsphere.elasticjob.infra.pojo.JobConfigurationPOJO;
import org.apache.shardingsphere.elasticjob.engine.internal.storage.JobNodePath;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.api.JobStatisticsAPI;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.domain.JobBriefInfo;
import org.apache.shardingsphere.elasticjob.lifecycle.api.JobStatisticsAPI;
import org.apache.shardingsphere.elasticjob.lifecycle.domain.JobBriefInfo;
import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;
import org.apache.shardingsphere.elasticjob.infra.yaml.YamlEngine;

Expand Down Expand Up @@ -113,7 +113,7 @@ private boolean isHasShardingFlag(final JobNodePath jobNodePath, final List<Stri
shardingInstances.add(instanceId);
}
}
return !instances.containsAll(shardingInstances) || shardingInstances.isEmpty();
return !new HashSet<>(instances).containsAll(shardingInstances) || shardingInstances.isEmpty();
}

private int getJobInstanceCount(final String jobName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.statistics;
package org.apache.shardingsphere.elasticjob.lifecycle.internal.statistics;

import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.elasticjob.infra.handler.sharding.JobInstance;
import org.apache.shardingsphere.elasticjob.infra.yaml.YamlEngine;
import org.apache.shardingsphere.elasticjob.engine.internal.storage.JobNodePath;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ServerStatisticsAPI;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.domain.ServerBriefInfo;
import org.apache.shardingsphere.elasticjob.lifecycle.api.ServerStatisticsAPI;
import org.apache.shardingsphere.elasticjob.lifecycle.domain.ServerBriefInfo;
import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.internal.statistics;
package org.apache.shardingsphere.elasticjob.lifecycle.internal.statistics;

import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.elasticjob.infra.handler.sharding.JobInstance;
import org.apache.shardingsphere.elasticjob.infra.yaml.YamlEngine;
import org.apache.shardingsphere.elasticjob.engine.internal.storage.JobNodePath;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.api.ShardingStatisticsAPI;
import org.apache.shardingsphere.elasticjob.engine.lifecycle.domain.ShardingInfo;
import org.apache.shardingsphere.elasticjob.lifecycle.api.ShardingStatisticsAPI;
import org.apache.shardingsphere.elasticjob.lifecycle.domain.ShardingInfo;
import org.apache.shardingsphere.elasticjob.reg.base.CoordinatorRegistryCenter;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle;
package org.apache.shardingsphere.elasticjob.lifecycle;

import lombok.extern.slf4j.Slf4j;
import org.apache.curator.framework.CuratorFramework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.api;
package org.apache.shardingsphere.elasticjob.lifecycle.api;

import org.apache.shardingsphere.elasticjob.engine.lifecycle.AbstractEmbedZookeeperBaseTest;
import org.apache.shardingsphere.elasticjob.lifecycle.AbstractEmbedZookeeperBaseTest;
import org.junit.jupiter.api.Test;

import static org.hamcrest.CoreMatchers.instanceOf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.domain;
package org.apache.shardingsphere.elasticjob.lifecycle.domain;

import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.engine.lifecycle.fixture;
package org.apache.shardingsphere.elasticjob.lifecycle.fixture;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
Expand Down
Loading