Skip to content

Commit

Permalink
disable HBase timestamp organizing logic during initial snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Volodymyr Pytak committed Apr 9, 2018
1 parent b8a2063 commit 36b1c57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.booking</groupId>
<artifactId>mysql-replicator</artifactId>
<version>0.14.4_02</version>
<version>0.14.4_04</version>
<packaging>jar</packaging>

<name>mysql-replicator</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public class HBaseApplierWriter {
private static final
ConcurrentHashMap<String, String> taskUUIDToPseudoGTID = new ConcurrentHashMap<>();

private final RowTimestampOrganizer timestampOrganizer;
private RowTimestampOrganizer timestampOrganizer;
private static PseudoGTIDCheckpoint latestCommittedPseudoGTIDCheckPoint;
/**
* Shared connection used by all tasks in applier.
Expand Down Expand Up @@ -172,7 +172,9 @@ public HBaseApplierWriter(
taskPool = Executors.newFixedThreadPool(this.poolSize);

mutationGenerator = new HBaseApplierMutationGenerator(configuration);
timestampOrganizer = new RowTimestampOrganizer();
if (!configuration.isInitialSnapshotMode()) {
timestampOrganizer = new RowTimestampOrganizer();
}

hbaseConf.set("hbase.zookeeper.quorum", configuration.getHBaseQuorum());
hbaseConf.set("hbase.client.keyvalue.maxsize", "0");
Expand Down Expand Up @@ -290,7 +292,9 @@ public synchronized void pushToCurrentTaskBuffer(AugmentedRowsEvent augmentedRow
}

List<AugmentedRow> augmentedRows = augmentedRowsEvent.getSingleRowEvents();
timestampOrganizer.organizeTimestamps(augmentedRows, mySQLTableName, currentTransactionUUID);
if (timestampOrganizer != null) {
timestampOrganizer.organizeTimestamps(augmentedRows, mySQLTableName, currentTransactionUUID);
}

// Add to buffer
for (AugmentedRow augmentedRow : augmentedRows) {
Expand Down

0 comments on commit 36b1c57

Please sign in to comment.