小编Sus*_*ale的帖子

createOrReplaceGlobalTempView和createOrReplaceTempView之间的区别

我试图了解createOrReplaceGlobalTempView和createOrReplaceTempView之间的区别。

在版本2.0中引入了createOrReplaceTempView,在版本2.2中引入了createOrReplaceGlobalTempView。

根据文档,

对于createOrReplaceGlobalTempView:此临时视图的生存期与此Spark应用程序相关。

对于createOrReplaceGlobalTempView:此临时表的生存期与用于创建此DataFrame的SparkSession绑定在一起。

您能否详细说明一下Spark Application和SparkSession的区别。

问候,

内拉杰

apache-spark pyspark

5
推荐指数
1
解决办法
1783
查看次数

如何在一天中的特定时间运行 .net Core IHosted 服务?

我有以下计时器在 .Net 核心 Ihosted 服务中运行,

TimeSpan ScheduledTimespan;
string[] formats = { @"hh\:mm\:ss", "hh\\:mm" };
string strTime = Startup.Configuration["AppSettings:JobStartTime"].ToString();
var success = TimeSpan.TryParseExact(strTime, formats, CultureInfo.InvariantCulture, out ScheduledTimespan);
Timer _timer = new Timer(JobToRun, null, TimeSpan.Zero, ScheduledTimespan);
Run Code Online (Sandbox Code Playgroud)

我正在使用这个特定的重载,

public Timer(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period);
Run Code Online (Sandbox Code Playgroud)

但是JobToRun一旦控制到达它就会执行。如何让它在每天的特定时间运行?提前致谢。

c# timer .net-core asp.net-core-hosted-services

2
推荐指数
2
解决办法
2659
查看次数