I'm having an issue with the CSV I'm trying to figure out. I've included
all the setup info and data below.
When I drop the csv into the /tmp/test directory I get the following error
[2013-08-30 12:01:17,148][INFO ][gateway ] [Spider-Slayer]
recovered [1] indices into cluster_state
[2013-08-30 12:01:17,358][WARN ][river ] [Spider-Slayer]
failed to create river [csv][my_csv_river]
org.elasticsearch.common.inject.CreationException: Guice creation errors:
- Error injecting constructor, java.lang.StringIndexOutOfBoundsException:
String index out of range: 0
at org.elasticsearch.river.csv.CSVRiver.(Unknown Source)
while locating org.elasticsearch.river.csv.CSVRiver
while locating org.elasticsearch.river.River
1 error
at
org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)
at
org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at
org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at
org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at org.elasticsearch.river.RiversService.createRiver(RiversService.java:138)
at
org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)
at
org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)
at
org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:87)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: 0
at java.lang.String.charAt(String.java:686)
at org.elasticsearch.river.csv.CSVRiver.(CSVRiver.java:86)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:54)
at
org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at
org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:98)
at org.elasticsearch.common.inject.FactoryProxy.get(FactoryProxy.java:52)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:819)
at
org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:57)
at
org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at
org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:200)
at
org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
at
org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:812)
at
org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
at
org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
... 10 more
I've installed elasticsearch on osx using homebrew,
I cloned the csv river from here
and built it with maven. I unzipped the river into
/usr/local/var/lib/elasticsearch/plugins/csv-river/
ls -la /usr/local/var/lib/elasticsearch/plugins/csv-river/
-rw-r--r-- 1 staff staff 12622 29 Aug 22:41
elasticsearch-river-csv-1.0.1.jar
-rw-r--r-- 1 staff staff 15347 29 Aug 22:23 opencsv-2.0.jar
and restarted ES, the plugin loads I think
elasticsearch -f -D
es.config=/usr/local/opt/elasticsearch/config/elasticsearch.yml
[2013-08-30 12:01:11,278][INFO ][node ] [Spider-Slayer]
{0.90.2}[50307]: initializing ...
[2013-08-30 12:01:11,291][INFO ][plugins ] [Spider-Slayer]
loaded [river-csv], sites []
I setup the river with
curl -XPUT "http://localhost:9200/_river/my_csv_river/_meta" -d'
{
"type" : "csv",
"csv_file" : {
"folder" : "/tmp/test",
"filename_mask" : ".*\.csv$",
"poll":"5m",
"fields" : [
"column1",
"column2",
"column3",
"column4"
],
"field_separator" : ",",
"escape_character" : ";",
"quote_character" : ""
},
"index" : {
"index" : "my_csv_data",
"type" : "csv_row",
"bulk_size" : 10000,
"bulk_threshold" : 50
}
}'
My test csv is as follows
a, b , c , d
a, b , c , d
Any ideas ???
Thanks
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.