在MapReduce中,reduce任务与reducer有何不同(In MapReduce, how does reduce task differ from reducer)
在Mapreduce中,Reduce任务与Reducer有何不同?
reduce任务和reducer之间有什么关联?
Reducer是否执行reduce任务?
非常感谢
In Mapreduce, How does Reduce task differ from Reducer?
What is the correlation between reduce task and reducer?
Does Reducer perform the reduce task?
Many Thanks
原文:
最满意答案
对于ID的问题,您应该使用GUID作为ID,甚至不要使用身份主键尝试此ID。 这允许您在客户端,Web服务器等上创建ID,并且它们不会重复。
对于同步问题,有不同的工具和第三方应用程序将为您执行此操作,但我不建议您使用您的程序,因为您可能有1000个客户端都需要复杂/昂贵的同步工具。 您应该编写一个可以发送/获取更改的Web服务,并在表中添加DateTime字段,以便在记录已存在时告知哪个数据库具有最新数据。 这需要一点点工作,但这就是我要做的。
顺便说一句,如果您使用的是VS2015而您的客户端都是Windows 10,那么有一些内置功能可用于构建为您同步的应用程序。 但是我们可以期待用户拥有Windows 10还需要一段时间。
For the issue of ID, you should use a GUID for the ID, do not even attempt this with an identity primary key. This allows you to create the ID on the client, web server, etc and they won't duplicate.
For the issue of synchronization, there are different tools and 3rd party applications that will do this for you but I wouldn't suggest doing that with your program because you may have 1000's of clients that would all need complex/expensive synchronization tools. You should write an Web Service that you can send/get changes from and add a DateTime field to your tables so you can tell which database has the latest data when the record already exists. It takes a little work but this is how I would do it.
BTW, if you are using VS2015 and your clients are all Windows 10, there are some build in features for building apps that synchronize for you. But it will be a while before we can expect users to have Windows 10.
相关问答
更多-
解决方案1 (我的推荐):每当系统在任一数据库中插入/更新记录时,您都会在数据库中添加/更新记录数据,并将该信息添加到Queue 。 sperate reader将从队列中读取并定期将数据复制到相应的数据库,这样您的数据将在数据库之间实现同步。 注意 :使用队列的另一个好处是您不必在DynamoDB表中设置非常高的吞吐量。 解决方案2:您在问题中建议的内容,您可以通过基于时间戳检查记录来添加将复制数据库的CRON作业。 Solution 1 (My Recommended): Whenever system ...
-
感谢大家,基于你的所有帮助,我可以编写一个PHP类,将表A中的所有列复制到表B中,如果它们不在那里: class MatchTable { var $_table_one_name; var $_table_two_name; var $_table_one_db_user; var $_table_one_db_pass; var $_table_one_db_host; var $_table_one_db_name; var $_table ...
-
在iOS 7及更早版本中: 当您调用-setObject:forKey:时,NSUserDefaults将来会调度同步操作大约10秒钟。 发生这种情况时,到目前为止的所有内容都会保存到持久存储中。 这里的想法是你可以自由地使用set和get方法,而无需每次都支付大量的性能成本。 在iOS 8上,NSUserDefaults的工作方式不同,延迟是几毫秒,而不是10秒,所以-synchronize几乎从来没用过。 On iOS 7 and earlier: When you call -setObject:fo ...
-
我看了一下芹菜和redis,看起来像一个cron工作会做我需要的 I had a look at celery and redis and it seems like a cron job will do what i need
-
你最好的选择是使用事务复制 。 作为最佳实践,性能将取决于 您要复制多少数据? 始终只复制您需要的数据(而不是整个数据库)。 发行商 - 分销商和订户之间的网络带宽。 请记住,初始快照将锁定发布端的表,因此最好在最短的活动时间内完成快照。 如果数据库太大,则可以从备份初始化它 。 另请参阅事务复制问题 。 Your best bet is to use Transactional Replication. As best practice, the performance will depend on Ho ...
-
在您的情况下需要重视这种情况!! 当我遇到这个问题时,第一个问题是...... 我想做的表'drop table'有几个数据? 如果是,最好的方法是'drop table'命令。 如果不是那么你需要使用'insert'和'update'命令。 我需要指出的是,SQLite数据库可能会随着时间的推移而增长,然后优秀的程序员会采用第二种方式,因为它更安全,您可以考虑未来的可能性。 我的应用程序可以随时同步或每天同步几次? 如果答案是在任何时候,那么您需要使用'insert'和'update'命令。 因为您无法每 ...
-
您需要使用BindingSource对象。 这将使您的DataTable与DataGridView保持同步。 因此,将BindingSource的DataSource设置为表,然后将DataGridView的DataSource设置为BindingSource。 例: // DataGridView DataGridView dg = new DataGridView(); // BindingSource (used for synchronizing table and grid) BindingSo ...
-
由于9.0 PostgreSQL提供自己的复制 。 如果您使用8.x,您可以尝试其他解决方案。 就个人而言,我使用了slony并且非常满意。 Since 9.0 PostgreSQL supplies it own replication. If you use 8.x you can try other solutions. Personally I used slony and was quite pleased with it.
-
仅供参考,数据存储API 3.0测试版包含一个名为“本地数据存储”的预览功能,可以避免对此的需求。 请参阅此处发布预览功能的博客文章: https : //www.dropbox.com/developers/blog/97/sync-api-and-datastore-api-30-beta-release 。 Finally I have this implemented. Sources can be found here. Key class is implementation of Dropbox ...
-
对于ID的问题,您应该使用GUID作为ID,甚至不要使用身份主键尝试此ID。 这允许您在客户端,Web服务器等上创建ID,并且它们不会重复。 对于同步问题,有不同的工具和第三方应用程序将为您执行此操作,但我不建议您使用您的程序,因为您可能有1000个客户端都需要复杂/昂贵的同步工具。 您应该编写一个可以发送/获取更改的Web服务,并在表中添加DateTime字段,以便在记录已存在时告知哪个数据库具有最新数据。 这需要一点点工作,但这就是我要做的。 顺便说一句,如果您使用的是VS2015而您的客户端都是Win ...