svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
bin=${DIR}/bin
lib=${DIR}/lib
echo $lib
echo $bin
echo '{
"type" : "jdbc",
"jdbc" : {
"driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"url" : "jdbc:sqlserver://usalvwaldbqa1:1433;databaseName=es"",
"user" : "es",
"password" : "Answ3r21",
"sql" : "SELECT * FROM es.es.g_fast_documentation",
"treat_binary_as_string" : true,
"elasticsearch" : {
"cluster" : "elasticsearch_dev",
"host" : "localhost",
"port" : 9200
},
"max_bulk_actions" : 20000,
"max_concurrent_bulk_requests" : 10,
"index" : "my_index",
"type":"my_type"
}
}
' | java -cp "elasticsearch-jdbc-1.5.2.0-uberjar.jar;hsqldb-2.3.2.jar" \
-Dlog4j.configurationFile=${bin}/log4j2.xml \
org.xbib.tools.Runner \
org.xbib.tools.JDBCImporter
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ bin=${DIR}/bin
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ lib=${DIR}/lib
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ echo $lib
/cygdrive/d/elastic/jdbcimporter/lib
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ echo $bin
/cygdrive/d/elastic/jdbcimporter/bin
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ echo '{
"type" : "jdbc",
"jdbc" : {
"driver": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
"url" : "jdbc:sqlserver://usalvwaldbqa1:1433;databaseName=es"",
"user" : "es",
"password" : "Answ3r21",
"sql" : "SELECT * FROM es.es.g_fast_documentation",
"treat_binary_as_string" : true,
"elasticsearch" : {
"cluster" : "elasticsearch_dev",
"host" : "localhost",
"port" : 9200
},
"max_bulk_actions" : 20000,
"max_concurrent_bulk_requests" : 10,
"index" : "my_index",
"type":"my_type"
}
}
' | java -cp "elasticsearch-jdbc-1.5.2.0-uberjar.jar;hsqldb-2.3.2.jar" \
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
See Java SE - Documentation for more details.
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ -Dlog4j.configurationFile=${bin}/log4j2.xml \
-bash: -Dlog4j.configurationFile=/cygdrive/d/elastic/jdbcimporter/bin/log4j2.xml: No such file or directory
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ org.xbib.tools.Runner \
-bash: org.xbib.tools.Runner: command not found
svc-msfast@usalvwdevmsfast1 /cygdrive/d/elastic/jdbcimporter
$ org.xbib.tools.JDBCImporter
-bash: org.xbib.tools.JDBCImporter: command not found