class GCPCredentialCopier {

  public void copyCredentials(
      FileSystem fs,
      Configuration conf,
      GCPCredentialPathProvider credentialPathProvider,
      DistributedFileSystemPathProvider dfsPathProvider) {
    try {
      Path source = credentialPathProvider.newPath();
      Path destination = dfsPathProvider.newPath(conf);
      copyCredentialIntoHdfs(fs, source, destination);
      linkRelativePathInDistributedCache(conf, source, destination);
    } catch (IOException | URISyntaxException e) {
      throw new CircusTrainException(e);
    }
  }

}