Skip to content

Commit

Permalink
Enable CheckStyle Plugin in Pulsar transaction (apache#13409)
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhangjian authored Dec 21, 2021
1 parent 2adb666 commit 3fa3215
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
public interface TransactionLog {

/**
* Initialize the TransactionLog implementation
* Initialize the TransactionLog implementation.
*/
CompletableFuture<Void> initialize();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public interface TransactionRecoverTracker {
* @param sequenceId {@link long} the sequenceId of this transaction.
* @param txnStatus {@link long} the txn status of this operation.
*/
void updateTransactionStatus(long sequenceId, TxnStatus txnStatus) throws CoordinatorException.InvalidTxnStatusException;
void updateTransactionStatus(long sequenceId, TxnStatus txnStatus)
throws CoordinatorException.InvalidTxnStatusException;

/**
* Handle recover transaction in open status.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.apache.pulsar.transaction.coordinator;

import com.google.common.annotations.Beta;

import java.util.concurrent.CompletableFuture;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.LongAdder;

import org.apache.pulsar.client.api.transaction.TxnID;
import org.apache.pulsar.common.policies.data.TransactionCoordinatorStats;
import org.apache.pulsar.transaction.coordinator.TransactionCoordinatorID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
package org.apache.pulsar.transaction.coordinator.impl;

import io.netty.buffer.ByteBuf;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.bookkeeper.client.LedgerHandle;
import org.apache.bookkeeper.client.api.LedgerEntry;
import org.apache.bookkeeper.mledger.impl.OpAddEntry;
import org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor;
import org.apache.pulsar.transaction.coordinator.proto.TransactionMetadataEntry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicLong;

/**
* Store max sequenceID in ManagedLedger properties, in order to recover transaction log.
Expand Down
14 changes: 13 additions & 1 deletion pulsar-transaction/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,19 @@
</execution>
</executions>
</plugin>

<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>
Expand Down

0 comments on commit 3fa3215

Please sign in to comment.