JDBC River parameters

Jörg Prante edited this page on 23 Jan 2014 · 3 revisions

Overview of the default parameter settings:

{
"jdbc" :{
"strategy" : "simple",
"url" : null,
"user" : null,
"password" : null,
"sql" : null,
"schedule" : null,
"poolsize" : 1,
"rounding" : null,
"scale" : 2,
"autocommit" : false,
"fetchsize" : 10, /* Integer.MIN for MySQL */
"max_rows" : 0,
"max_retries" : 3,
"max_retries_wait" : "30s",
"locale" : Locale.getDefault().toLanguageTag(),
"index" : "jdbc",
"type" : "jdbc",
"bulk_size" : 100,
"max_bulk_requests" : 30,
"bulk_flush_interval" : "5s",
"index_settings" : null,
"type_mapping" : null
}
}

strategy -the strategy of the JDBC river, currently implemented: "simple", "column"

url - the JDBC URL

user - the JDBC database user

password - the JDBC database password

sql - SQL statement(s), either a string or a list. If a statement ends with .sql, the statement is looked up in the file system. Example for a list of SQL statements:

"sql" : [
{
"statement" : "select ... from ... where a = ?, b = ?, c = ?",
"parameter" : [ "value for a", "value for b", "value for c" ],
"callable" : false
},
{
"statement" : ...
}
]

parameter - bind parameters for the SQL statement (in order)

callable - boolean flag, if true, the SQL statement is interpreted as a JDBC CallableStatement (default: false)

schedule - a cron expression for scheduled execution. Syntax is equivalent to the Quartz cron expression format and is documented at http://jprante.github.io/elasticsearch-river-jdbc/apidocs/org/xbib/elasticsearch/river/jdbc/support/cron/CronExpression.html

poolsize - the pool size of the thread pool that executes the scheduled SQL statements

rounding - rounding mode for numeric values: "ceiling", "down", "floor", "halfdown", "halfeven", "halfup", "unnecessary", "up"

scale - the precision of the numeric values

autocommit - true if each statement should be automatically executed

fetchsize - the fetchsize for large result sets, most drivers implement fetchsize to control the amount of rows in the buffer while iterating through the result set

max_rows - limit the number of rows fetches by a statement, the rest of the rows is ignored

max_retries - the number of retries to (re)connect to a database

max_retries_wait - the time that should be waited between retries

locale - the default locale (used for parsing numerical values, floating point character)

index - the Elasticsearch index used for indexing the data from JDBC

type - the Elasticsearch type of the index used for indexing the data from JDBC

bulk_size - the length of each bulk index request submitted

max_bulk_requests - the maximum number of concurrent bulk requests

bulk_flush_interval - the time period the bulk processor is flushing outstanding documents

index_settings - optional settings for the Elasticsearch index

type_mapping - optional mapping for the Elasticsearch index type

elasticsearch river 参数文档的更多相关文章

  1. Elasticsearch 7.x文档基本操作(CRUD)

    官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html 1.添加文档 1.1.指定文档ID PUT ...

  2. elasticsearch 官方监控文档 老版但很有用

    https://zhaoyanblog.com/page/1?s=elasticsearch 监控每个节点(jvm部分) 操作系统和进程部分 操作系统和进程部分的含义是很清楚的,这里不会描述的很详细. ...

  3. elasticsearch 基础 —— 分布式文档存储原理

    路由一个文档到一个分片中 当索引一个文档的时候,文档会被存储到一个主分片中. Elasticsearch 如何知道一个文档应该存放到哪个分片中呢?当我们创建文档时,它如何决定这个文档应当被存储在分片  ...

  4. 【Elasticsearch学习】文档搜索全过程

    在ES执行分布式搜索时,分布式搜索操作需要分散到所有相关分片,若一个索引有3个主分片,每个主分片有一个副本分片,那么搜索请求会在这6个分片中随机选择3个分片,这3个分片有可能是主分片也可能是副本分片, ...

  5. 关于Elasticsearch单个索引文档最大数量问题

    因为ElasticSearch是一个基于Lucene的搜索服务器.Lucene的索引有个难以克服的限制,导致Elasticsearch的单个分片存在最大文档数量限制,一个索引分片的最大文档数量是20亿 ...

  6. Elasticsearch操作Document文档

    1.利用客户端操作Document文档数据        1.1 创建一个文档(创建数据的过程,向表中去添加数据)            请求方式:Post    请求地址:es所在IP:9200/索 ...

  7. 5.ElasticSearch系列之文档的基本操作

    1. 文档写入 # create document. 自动生成 _id POST users/_doc { "user" : "shenjian", " ...

  8. Elasticsearch 相同内容文档,不同score(评分)的奇怪问题

    原文:http://stackoverflow.com/questions/14580752/elasticsearch-gives-different-scores-for-same-documen ...

  9. elasticsearch 查询所有文档

    0.添加一个索引 curl -i -XPUT http://172.31.250.16:10004/test_index/user/1 -d '{ "name": "小明 ...

随机推荐

  1. 使用OCCI操作Oracle数据库写入中文乱码

    解决方法如下: oracle::occi::Environment *pOracleOcciEnv = Environment::createEnvironment(oracle::occi::Env ...

  2. JMeter设置响应数据的编码格式

    1.修改配置文件jmeter.properties第974行,默认编码格式为ISO-8859-1,手动修改为UTF-8 2.增加元器件 在线程组右键,添加->后置处理器->BeanShel ...

  3. css---文本新增样式

    opacity属性指定了一个元素的透明度 默认值:1.0 不可继承    兼容性不是太好 兼容性写法 opacity{ opacity:0.5; filter:alpha(opacity=); //f ...

  4. duilib教程之duilib入门简明教程18.其他

    一.超链接按钮     代码很简单,参见360Demo:     <Button text="{u}{a}求助{/a}{/u}" showhtml="true&qu ...

  5. Super OJ 序列计数

    题意: 给出序列 a1,a2,--an(0≤ai≤109),求三元组(ai,aj,ak)(1≤i<j<k≤n)满足 ai<aj>ak 的数量. 分析: 开两个\(BIT\),分 ...

  6. memcpy函数实现中的优化

    今天浏览Google面试题的时候,有看到一个memcpy的实现,以及如何去优化memcpy. 我对memcpy的实现的记忆就是,拷贝的时候需要从后往前拷贝,为何防止内存重叠. 但是如果去优化它我没有想 ...

  7. overload和override二者之间的区别

    overload和override三者之间的区别 Overload是重载,是有相同的方法名,但参数类型或个数彼此不同Override是重写,是在子类与父类中,子类中的方法的方法名,参数个数.类型都与父 ...

  8. php array_unshift,array_push追加数组元素

    追加元素在数组前面:<?php $a=array("a"=>"Cat","b"=>"Dog"); ar ...

  9. POJ - 2778 ~ HDU - 2243 AC自动机+矩阵快速幂

    这两题属于AC自动机的第二种套路通过矩阵快速幂求方案数. 题意:给m个病毒字符串,问长度为n的DNA片段有多少种没有包含病毒串的. 根据AC自动机的tire图,我们可以获得一个可达矩阵. 关于这题的t ...

  10. vue/cli 3.0脚手架搭建

    在vue 2.9.6中,搭建vue-cli脚手架的流程是这样的: 首先 全局安装vue-cli,在cmd中输入命令: npm install --global vue-cli  安装成功:  安装完成 ...