/// <exception cref="System.Exception"/> protected override void ServiceInit(Configuration conf) { if (this.scmAddress == null) { this.scmAddress = GetScmAddress(conf); } this.conf = conf; this.checksum = SharedCacheChecksumFactory.GetChecksum(conf); base.ServiceInit(conf); }
/// <param name="resource">the local resource that contains the original remote path</param> /// <param name="localPath"> /// the path in the local filesystem where the resource is /// localized /// </param> /// <param name="fs">the filesystem of the shared cache</param> /// <param name="localFs">the local filesystem</param> public SharedCacheUploader(LocalResource resource, Path localPath, string user, Configuration conf, SCMUploaderProtocol scmClient, FileSystem fs, FileSystem localFs) { this.resource = resource; this.localPath = localPath; this.user = user; this.conf = conf; this.scmClient = scmClient; this.fs = fs; this.sharedCacheRootDir = conf.Get(YarnConfiguration.SharedCacheRoot, YarnConfiguration .DefaultSharedCacheRoot); this.nestedLevel = SharedCacheUtil.GetCacheDepth(conf); this.checksum = SharedCacheChecksumFactory.GetChecksum(conf); this.localFs = localFs; this.recordFactory = RecordFactoryProvider.GetRecordFactory(null); }