forked from v5tech/elasticsearch-jest-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnews.bat
More file actions
32 lines (30 loc) · 1011 Bytes
/
Copy pathnews.bat
File metadata and controls
32 lines (30 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
set DIR=%~dp0
set LIB="%DIR%\..\lib\*"
set BIN="%DIR%\..\bin\*"
REM ???
echo {^
"type" : "jdbc",^
"jdbc" : {^
"url" : "jdbc:mysql://localhost:3306/news",^
"user" : "root",^
"password" : "root",^
"schedule" : "0 0/15 * ? * *",^
"sql" : [^
{"statement":"SELECT title,content,url,source,author,pubdate FROM news"},^
{^
"statement":"SELECT title,content,url,source,author,pubdate FROM news where pubdate > ?",^
"parameter" : [ "$metrics.lastexecutionstart" ]^
}^
],^
"autocommit" : true,^
"treat_binary_as_string" : true,^
"elasticsearch" : {^
"cluster" : "elasticsearch",^
"host" : "localhost",^
"port" : 9300^
},^
"index" : "news",^
"type" : "article"^
}^
}^ | "%JAVA_HOME%\bin\java" -cp "%LIB%" -Dlog4j.configurationFile="file://%DIR%\log4j2.xml" "org.xbib.tools.Runner" "org.xbib.tools.JDBCImporter"