MongoDB数据库中的后端存储过程调度程序 [英] Backend stored procedure schedulers in MongoDB database

查看:65
本文介绍了MongoDB数据库中的后端存储过程调度程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我们正在使用apache flume框架从所有Web应用程序中收集日志,并将其存储在名为"Raw_Data"的MongoDB数据库表中. 现在,我们有一个任务来区分日志,并根据应用程序将日志信息存储在不同的表中.因此,我们决定为每个应用程序维护一个单独的表.有什么方法可以像调度程序那样创建和运行存储的JavaScript,以便在MongoDB中明智地加载数据应用程序?

Currently we are using apache flume framework to collect the logs from all our web applications and it will store the logs in MongoDB database table called "Raw_Data". Now we got a task to differentiate the logs and store the logging information in different tables based on the application. So we decided to maintain a separate table for each application. Is there any way to create and run stored JavaScript on a frequency like scheduler to load the data application wise in MongoDB?

我对oracle DB非常熟悉,但是我是MongoDb的新手.有人可以帮我尽快找到所需的东西吗.

I’m very much familiar with oracle DB but I’m new to MongoDb. Can someone help me to find out the required things for this asap.

谢谢 Kishore

Thanks Kishore

推荐答案

MongoDB已存储Javascript过程,但没有调度程序.

MongoDB has stored Javascript procedures, but no scheduler.

http://docs.mongodb.org/manual /tutorial/store-javascript-function-on-server/

您可以使用cron作业和mongo shell从客户端计算机触发此操作.但是,我强烈建议您仅使用Python或类似的客户端脚本语言运行脚本.与服务器端Javascript相比,版本控制和调试要容易得多.

You could trigger this from a client machine using a cron job and the mongo shell. However, I strongly recommend simply running a script in Python or similar client-side scripting language. It'll be far easier to version-control and to debug than server-side Javascript.

这篇关于MongoDB数据库中的后端存储过程调度程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆