protected TSStatus loginIfNecessary() {
    if (shouldLogin()) {
      final TSStatus permissionCheckStatus = login();
      if (permissionCheckStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
        LOGGER.warn(
            "Receiver id = {}: Failed to login, username = {}, response = {}.",
            receiverId.get(),
            username,
            permissionCheckStatus);
        return permissionCheckStatus;
      } else {
        lastSuccessfulLoginTime = System.currentTimeMillis();
      }
    }
    return StatusUtils.OK;
  }
{@link IoTDBFileReceiver} is the parent class of receiver on both configNode and DataNode,
handling all the logic of parallel file receiving.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/IoTDBFileReceiver.java