首页 \ 问答 \ 怎么在linux系统下部署flask

怎么在linux系统下部署flask

更新时间:2022-01-27 11:01

最满意答案

1.如何实现mysql与elasticsearch的数据同步?

逐条转换为json显然不合适,需要借助第三方工具或者自己实现。核心功能点:同步增、删、改、查同步。
2、mysql与elasticsearch同步的方法有哪些?优缺点对比?
目前该领域比较牛的插件有:
1)、elasticsearch-jdbc,严格意义上它已经不是第三方插件。已经成为独立的第三方工具。https://github.com/jprante/elasticsearch-jdbc
2)、elasticsearch-river-MySQL插件 https://github.com/scharron/elasticsearch-river-mysql
3)、go-mysql-elasticsearch(国内作者siddontang) https://github.com/siddontang/go-mysql-elasticsearch
1-3同步工具/插件对比:
go-mysql-elasticsearch仍处理开发不稳定阶段。
为什么选择elasticsearch-jdbc而不是elasticsearch-river-mysql插件的原因?(参考:http://stackoverflow.com/questions/23658534/using-elasticsearch-river-mysql-to-stream-data-from-mysql-database-to-elasticsea)
1)通用性角度:elasticsearch-jdbc更通用,
2)版本更新角度:elasticsearch-jdbc GitHub活跃度很高,最新的版本2.3.3.02016年5月28日兼容Elasticsearch2.3.3版本。
而elasticsearch-river-mysql 2012年12月13日后便不再更新。
综上,选择elasticsearch-jdbc作为mysql同步Elasticsearch的工具理所当然。

相关问答

更多
  • 1.如何实现mysql与elasticsearch的数据同步? 逐条转换为json显然不合适,需要借助第三方工具或者自己实现。核心功能点:同步增、删、改、查同步。 2、mysql与elasticsearch同步的方法有哪些?优缺点对比? 目前该领域比较牛的插件有: 1)、elasticsearch-jdbc,严格意义上它已经不是第三方插件。已经成为独立的第三方工具。https://github.com/jprante/elasticsearch-jdbc 2)、elasticsearch-river-MyS ...
  • 1.如何实现mysql与elasticsearch的数据同步? 逐条转换为json显然不合适,需要借助第三方工具或者自己实现。核心功能点:同步增、删、改、查同步。 2、mysql与elasticsearch同步的方法有哪些?优缺点对比? 目前该领域比较牛的插件有: 1)、elasticsearch-jdbc,严格意义上它已经不是第三方插件。已经成为独立的第三方工具。https://github.com/jprante/elasticsearch-jdbc 2)、elasticsearch-river-MyS ...
  • 不需要每次集合更新时都不需要运行它。 根据config中的刷新间隔刷新索引,或者通过调用“_refresh”手动刷新索引 是的,支持分页,使用字段“从”,“大小”,“排序”排序查询请参阅 ElasticSearch分页和排序 是的,你可以在任何领域搜索,请参阅http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query/ no you need not run that every time a collection ge ...
  • 解决了 import org.elasticsearch.node.NodeBuilder.nodeBuilder val node = nodeBuilder().node() val client = node.client() solved import org.elasticsearch.node.NodeBuilder.nodeBuilder val node = nodeBuilder().node() val client = node.client()
  • 通过将IP更改为vps IP地址解决了问题:9200 +正在运行Model_name.__elasticsearch__.create_index! force: true Model_name.__elasticsearch__.create_index! force: true在rails控制台中为Model_name.__elasticsearch__.create_index! force: true The problem was resolved by changing ip to vps ip ...
  • 有一篇关于类型与索引的好博客文章: https : //www.elastic.co/blog/index-vs-type 拥有相同的映射和字段是一个很好的起点(因为稀疏性是一个问题)。 请注意,将来类型将被删除,因此不要过多地将其逻辑结构化。 但是你可以在查询中使用enum字段和过滤器。 There's a good blog post about type vs index: https://www.elastic.co/blog/index-vs-type Having the same mappin ...
  • 对于文件安全存储的温暖和舒适的感觉? 如果需要,您可以将所有内容存储在ES中,某些数据集不关心耐久性,但ES具有副本集和其他耐久性措施,因此持久性不是一个大问题。 我从使用ES中可以看出的主要问题是它没有一个日志,这可能会造成问题,但它是一个直接的磁盘技术。 因此,“温暖和舒适”的感觉完全适用于ES。 这几乎是主题的长度......我知道这不太有趣。 for that warm and cozy feeling that documents are being safely stored? You can ...
  • 您正在寻找的是分页。 您可以通过查询固定大小并设置from参数来实现目标。 由于您希望以250个结果的批量设置显示,因此可以设置size = 250并且对于每个连续查询,将from的值增加250 。 GET /_search?size=250 ---- return first 250 results GET /_search?size=250&from=250 ---- next 250 results GET /_search?size=2 ...
  • 使用Elasticsearch没有“正确的方法”。 “正确”是相对的,因此“正确的方式”是支持您的用例的一种方式。 Elasticsearch不仅适用于一个特定的用例,而且适用于越来越多的用例。 您描述的案例是完全有效的案例,即在ES中索引您在另一个RDBMS(例如MySQL)中拥有的任何内容,并确保索引内容与主要事实源同步。 在您的用例中,您需要记住的一件事是,您必须保证MySQL和ES始终是1:1同步,并且由于各种原因这不一定容易做到: 如果您需要将ES关闭以进行维护,会发生什么情况,但您的应用程序必须 ...
  • 您似乎知道如何使用关系数据库,但是当您考虑NoSQL时,您从关系角度来看它。 NoSQL世界很大,不同的数据库提供不同的优点和缺点。 例如:使用solr / elasticsearch / mongo可以让您存储数据并相当有效地查询它,而其他数据库,例如键值大数据数据库(cassandra和Hbase,仅举几例)将提供更好的性能,但您将被限制为“完全匹配”查询。 就个人而言,我坚信使用关系数据库,只要存储的数据量不是太多就无法处理。 关系数据库非常成熟和强大。 (另外,如果你打算使用关系数据库,我可以建议使 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)