@Override
  protected void logReplicationStatus(RemoteReplicaInfo rinfo,
      ExchangeMetadataResponse mdResponse) {
    JSONObject json = new JSONObject();
    try {
      // Ensures json fields are printed exactly in the order they are inserted
      Field changeMap = json.getClass().getDeclaredField("map");
      changeMap.setAccessible(true);
      changeMap.set(json, new LinkedHashMap<>());
      changeMap.setAccessible(false);
    } catch (IllegalAccessException | NoSuchFieldException e) {
      logger.error(e.getMessage());
      json = new JSONObject();
    }
    // Maintain alphabetical order of fields for string match
    json.put("replica_token", rinfo.getToken().toString());
    // Pretty print with indent for easy viewing
    fileManager.truncateAndWriteToFile(getFilePath(rinfo, REPLICA_STATUS_FILE), json.toString(4));
  }
Prints a log if local store has caught up with remote store
@param rinfo Info about remote replica
@param mdResponse Metadata response object
ambry-replication/src/main/java/com/github/ambry/replication/BackupCheckerThread.java