Skip to content

Commit

Permalink
[cleanup] Enable checkstyle in pulsar-client-admin module (#6596)
Browse files Browse the repository at this point in the history
  • Loading branch information
yjshen authored Mar 25, 2020
1 parent 1537de2 commit f7ccdb8
Show file tree
Hide file tree
Showing 46 changed files with 1,447 additions and 1,049 deletions.
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,18 @@ flexible messaging model and an intuitive client API.</description>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.0.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${puppycrawl.checkstyle.version}</version>
</dependency>
</dependencies>
<configuration>
<configLocation>buildtools/src/main/resources/pulsar/checkstyle.xml</configLocation>
<suppressionsLocation>buildtools/src/main/resources/pulsar/suppressions.xml</suppressionsLocation>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
Expand Down
18 changes: 18 additions & 0 deletions pulsar-client-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,22 @@
<artifactId>gson</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>checkstyle</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,53 +18,53 @@
*/
package org.apache.pulsar.client.admin;

import java.util.concurrent.CompletableFuture;

import org.apache.pulsar.common.policies.data.BookieInfo;
import org.apache.pulsar.common.policies.data.BookiesRackConfiguration;

import java.util.concurrent.CompletableFuture;

/**
* Admin interface for bookies rack placement management.
*/
public interface Bookies {

/**
* Gets the rack placement information for all the bookies in the cluster
* Gets the rack placement information for all the bookies in the cluster.
*/
BookiesRackConfiguration getBookiesRackInfo() throws PulsarAdminException;

/**
* Gets the rack placement information for all the bookies in the cluster asynchronously
* Gets the rack placement information for all the bookies in the cluster asynchronously.
*/
CompletableFuture<BookiesRackConfiguration> getBookiesRackInfoAsync();

/**
* Gets the rack placement information for a specific bookie in the cluster
* Gets the rack placement information for a specific bookie in the cluster.
*/
BookieInfo getBookieRackInfo(String bookieAddress) throws PulsarAdminException;

/**
* Gets the rack placement information for a specific bookie in the cluster asynchronously
* Gets the rack placement information for a specific bookie in the cluster asynchronously.
*/
CompletableFuture<BookieInfo> getBookieRackInfoAsync(String bookieAddress);

/**
* Remove rack placement information for a specific bookie in the cluster
* Remove rack placement information for a specific bookie in the cluster.
*/
void deleteBookieRackInfo(String bookieAddress) throws PulsarAdminException;

/**
* Remove rack placement information for a specific bookie in the cluster asynchronously
* Remove rack placement information for a specific bookie in the cluster asynchronously.
*/
CompletableFuture<Void> deleteBookieRackInfoAsync(String bookieAddress);

/**
* Updates the rack placement information for a specific bookie in the cluster
* Updates the rack placement information for a specific bookie in the cluster.
*/
void updateBookieRackInfo(String bookieAddress, String group, BookieInfo bookieInfo) throws PulsarAdminException;

/**
* Updates the rack placement information for a specific bookie in the cluster asynchronously
* Updates the rack placement information for a specific bookie in the cluster asynchronously.
*/
CompletableFuture<Void> updateBookieRackInfoAsync(String bookieAddress, String group, BookieInfo bookieInfo);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
*/
package org.apache.pulsar.client.admin;

import org.apache.pulsar.common.stats.AllocatorStats;
import org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

import java.util.concurrent.CompletableFuture;

import org.apache.pulsar.common.stats.AllocatorStats;
import org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport;

/**
* Admin interface for brokers management.
*/
Expand All @@ -50,7 +50,7 @@ public interface BrokerStats {

/**
* Requests JSON string server mbean dump.
* <p>
* <p/>
* Notes: since we don't plan to introspect the response we avoid converting the response into POJO.
*
* @return
Expand All @@ -60,7 +60,7 @@ public interface BrokerStats {

/**
* Requests JSON string server mbean dump asynchronously.
* <p>
* <p/>
* Notes: since we don't plan to introspect the response we avoid converting the response into POJO.
*
* @return
Expand All @@ -69,7 +69,7 @@ public interface BrokerStats {

/**
* Returns JSON string topics stats.
* <p>
* <p/>
* Notes: since we don't plan to introspect the response we avoid converting the response into POJO.
*
* @return
Expand All @@ -79,7 +79,7 @@ public interface BrokerStats {

/**
* Returns JSON string topics stats asynchronously.
* <p>
* <p/>
* Notes: since we don't plan to introspect the response we avoid converting the response into POJO.
*
* @return
Expand All @@ -88,7 +88,7 @@ public interface BrokerStats {

/**
* Get pending bookie client op stats by namespace.
* <p>
* <p/>
* Notes: since we don't plan to introspect the response we avoid converting the response into POJO.
*
* @return
Expand All @@ -98,7 +98,7 @@ public interface BrokerStats {

/**
* Get pending bookie client op stats by namespace asynchronously.
* <p>
* <p/>
* Notes: since we don't plan to introspect the response we avoid converting the response into POJO.
*
* @return
Expand Down
Loading

0 comments on commit f7ccdb8

Please sign in to comment.