protected override void Render(HtmlBlock.Block html) { SCMMetricsInfo metricsInfo = new SCMMetricsInfo(CleanerMetrics.GetInstance(), ClientSCMMetrics .GetInstance(), SharedCacheUploaderMetrics.GetInstance()); Info("Shared Cache Manager overview").("Started on:", Times.Format(scm.GetStartTime ())).("Cache hits: ", metricsInfo.GetCacheHits()).("Cache misses: ", metricsInfo .GetCacheMisses()).("Cache releases: ", metricsInfo.GetCacheReleases()).("Accepted uploads: " , metricsInfo.GetAcceptedUploads()).("Rejected uploads: ", metricsInfo.GetRejectUploads ()).("Deleted files by the cleaner: ", metricsInfo.GetTotalDeletedFiles()).("Processed files by the cleaner: " , metricsInfo.GetTotalProcessedFiles()); html.(typeof(InfoBlock)); }
/// <exception cref="System.Exception"/> protected override void ServiceStart() { Configuration conf = GetConfig(); this.metrics = SharedCacheUploaderMetrics.GetInstance(); YarnRPC rpc = YarnRPC.Create(conf); this.server = rpc.GetServer(typeof(SCMUploaderProtocol), this, bindAddress, conf, null, conf.GetInt(YarnConfiguration.ScmUploaderServerThreadCount, YarnConfiguration .DefaultScmUploaderServerThreadCount)); // Secret manager null for now (security not supported) // TODO (YARN-2774): Enable service authorization this.server.Start(); bindAddress = conf.UpdateConnectAddr(YarnConfiguration.ScmUploaderServerAddress, server.GetListenerAddress()); base.ServiceStart(); }
public virtual void TestNotify_noEntry() { long accepted = SharedCacheUploaderMetrics.GetInstance().GetAcceptedUploads(); SCMUploaderNotifyRequest request = recordFactory.NewRecordInstance <SCMUploaderNotifyRequest >(); request.SetResourceKey("key1"); request.SetFilename("foo.jar"); NUnit.Framework.Assert.IsTrue(proxy.Notify(request).GetAccepted()); ICollection <SharedCacheResourceReference> set = store.GetResourceReferences("key1" ); NUnit.Framework.Assert.IsNotNull(set); NUnit.Framework.Assert.AreEqual(0, set.Count); NUnit.Framework.Assert.AreEqual("NM upload metrics aren't updated.", 1, SharedCacheUploaderMetrics .GetInstance().GetAcceptedUploads() - accepted); }