Class NettyFileTransferClient

java.lang.Object
com.linkedin.davinci.blobtransfer.client.NettyFileTransferClient

public class NettyFileTransferClient extends Object
  • Constructor Details

    • NettyFileTransferClient

      public NettyFileTransferClient(int serverPort, String baseDir, StorageMetadataService storageMetadataService, int peersConnectivityFreshnessInSeconds)
  • Method Details

    • getConnectableHosts

      public Set<String> getConnectableHosts(HashSet<String> discoveredHosts, String storeName, int version, int partition)
      A method to get the connectable hosts for the given store, version, and partition This method is only used for checking connectivity to the hosts. Channel is closed after checking.
      Parameters:
      discoveredHosts - the list of discovered hosts for the store, version, and partition, but not necessarily connectable
      storeName - the store name
      version - the version
      partition - the partition
      Returns:
      the list of connectable hosts
    • purgeStaleConnectivityRecords

      public void purgeStaleConnectivityRecords(VeniceConcurrentHashMap<String,Long> hostsToTimestamp)
      Check the freshness of the connectivity records and purge the stale records
      Parameters:
      hostsToTimestamp - the map of hosts to the timestamp of the last connection attempt
    • get

      public CompletionStage<InputStream> get(String host, String storeName, int version, int partition, BlobTransferUtils.BlobTransferTableFormat requestedTableFormat)
    • close

      public void close()