saintstack commented on a change in pull request #2413:
URL: https://github.com/apache/hbase/pull/2413#discussion_r490713893



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
##########
@@ -780,9 +767,8 @@ public void postShipEdits(List<Entry> entries, int 
batchSize) {
     
this.manager.getGlobalMetrics().setWALReaderEditsBufferBytes(newBufferUsed);
   }
 
-  @Override
-  public WALFileLengthProvider getWALFileLengthProvider() {
-    return walFileLengthProvider;
+  @Override public WALProvider getWALProvider() {

Review comment:
       Will do

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
##########
@@ -160,9 +163,9 @@
    */
   private final List<WALEntryFilter> baseFilterOutWALEntries;
 
-  ReplicationSource() {
+  ReplicationSource(WALProvider walProvider) {

Review comment:
       init is fat as it is but this is added on Constructor because factory 
does construction and it knows all WALProviders and which to pass. The init is 
done after Construction. The context on what WALProvider to supply is not 
present at init time.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/AssignRegionHandler.java
##########
@@ -168,7 +180,7 @@ public static AssignRegionHandler create(HRegionServer 
server, RegionInfo region
       long openProcId, TableDescriptor tableDesc, long masterSystemTime) {
     EventType eventType;
     if (regionInfo.isMetaRegion()) {
-      eventType = EventType.M_RS_CLOSE_META;
+      eventType = EventType.M_RS_OPEN_META;

Review comment:
       Yes

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
##########
@@ -231,36 +233,41 @@ private void decorateConf() {
     }
   }
 
+  @Override public String toString() {
+    return "ReplicationSource[peerId=" + peerId + "]";
+  }
+
   @Override
   public void enqueueLog(Path wal) {
     if (!this.filterInWALs.test(wal)) {
       LOG.trace("NOT replicating {}", wal);
       return;
     }
-    String logPrefix = 
AbstractFSWALProvider.getWALPrefixFromWALName(wal.getName());
-    PriorityBlockingQueue<Path> queue = queues.get(logPrefix);
+    // Use WAL prefix as the WALGroupId for this peer.
+    String walGroupId = 
AbstractFSWALProvider.getWALPrefixFromWALName(wal.getName());

Review comment:
       Yes. Better. Done in next patch.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to