调度程序关闭流警告
Scheduler closing stream warning
我的笔记本电脑上有一个定期批处理作业 运行。代码如下所示:
client = Client()
print(client.scheduler_info())
topic='raw_data'
start = datetime.datetime.now()
delta = datetime.timedelta(minutes=2)
while True:
end = start + delta
if end <= datetime.datetime.now():
start = end
print('It\'s time to run the analysis for the 2 mins')
data = get_data_from_parquet('raw_data_fast_par.par', start=start, end=end)
metrics = [Metric1(), Metric2(), Metric3()]
print(data.npartitions)
channels = data.groupby(['col1', 'col2', 'col3'])
for metric in metrics:
features = metric.map_job(channels, start, end)
print(features.count().compute())
简而言之,我每两分钟对数据执行某种分析,我从镶木地板文件中读取这些数据,预测日期过滤。这是一个测试,所以我知道现在没有多大意义。
我在终端上收到以下警告。有人可以解释为什么会发生这种情况,如果它很重要,我该如何避免它?
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:55448 remote=tcp://127.0.0.1:42197>
我不知道实际问题是什么,但您可以在完成后尝试彻底关闭本地集群,也许可以使用 Client
作为上下文管理器。
with Client() as client:
...
我的笔记本电脑上有一个定期批处理作业 运行。代码如下所示:
client = Client()
print(client.scheduler_info())
topic='raw_data'
start = datetime.datetime.now()
delta = datetime.timedelta(minutes=2)
while True:
end = start + delta
if end <= datetime.datetime.now():
start = end
print('It\'s time to run the analysis for the 2 mins')
data = get_data_from_parquet('raw_data_fast_par.par', start=start, end=end)
metrics = [Metric1(), Metric2(), Metric3()]
print(data.npartitions)
channels = data.groupby(['col1', 'col2', 'col3'])
for metric in metrics:
features = metric.map_job(channels, start, end)
print(features.count().compute())
简而言之,我每两分钟对数据执行某种分析,我从镶木地板文件中读取这些数据,预测日期过滤。这是一个测试,所以我知道现在没有多大意义。 我在终端上收到以下警告。有人可以解释为什么会发生这种情况,如果它很重要,我该如何避免它?
distributed.comm.tcp - WARNING - Closing dangling stream in <TCP local=tcp://127.0.0.1:55448 remote=tcp://127.0.0.1:42197>
我不知道实际问题是什么,但您可以在完成后尝试彻底关闭本地集群,也许可以使用 Client
作为上下文管理器。
with Client() as client:
...