Comments (10)
Can you upload a small snippet of your data set so I can replicate the problem on my side? Just upload it somewhere since I'm not sure Github can handle attachments and posting here might cause whitespace problems.
from elasticsearch-hadoop.
I added a short (1 result) json document that shows the result from an elasticsearch query on my system. The result set contains an array in lines 19, 22, and 23, any of which will cause the problem.
https://github.com/bwmeier/elasticsearch-hadoop/blob/master/elasticsearch_array_result.json
If you have any questions about the result, let me know.
from elasticsearch-hadoop.
@bwmeier the problem should be fixed in master. As @tzolov pointed out, there was a bug in parsing arrays into proper Writables causing the default, byte array serialization, to occur.
This should be now fix. Please try it out and let me know if that's not the case.
from elasticsearch-hadoop.
The error's changed slightly, but not significantly. I now get the following exception trace, which again looks like the array processing, just with the ArrayList type instead of the Byte[]. I suspect that pig needs a translation from ArrayList to DataBag, or something of the sort, since the message is related to "standard Pig type".
2013-04-19 12:12:04,057 WARN org.apache.hadoop.mapred.Child: Error running child
java.lang.RuntimeException: Unexpected data type java.util.ArrayList found in stream. Note only standard Pig type is supported when you output from UDF/LoadFunc
at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:559)
at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:435)
at org.apache.pig.data.BinInterSedes.writeMap(BinInterSedes.java:581)
at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:451)
at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:435)
at org.apache.pig.data.BinInterSedes.writeMap(BinInterSedes.java:581)
at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:451)
at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:435)
at org.apache.pig.data.utils.SedesHelper.writeGenericTuple(SedesHelper.java:135)
at org.apache.pig.data.BinInterSedes.writeTuple(BinInterSedes.java:613)
at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:443)
at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:435)
at org.apache.pig.impl.io.InterRecordWriter.write(InterRecordWriter.java:73)
at org.apache.pig.impl.io.InterStorage.putNext(InterStorage.java:87)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.write(PigOutputFormat.java:139)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.write(PigOutputFormat.java:98)
at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.write(MapTask.java:559)
at org.apache.hadoop.mapreduce.task.TaskInputOutputContextImpl.write(TaskInputOutputContextImpl.java:85)
at org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.write(WrappedMapper.java:106)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.collect(PigMapOnly.java:48)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:285)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:278)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:64)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:140)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:673)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:331)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
from elasticsearch-hadoop.
Understood - I've reopened the issue and will try to address it by next week.
from elasticsearch-hadoop.
Thanks @costin, I appreciate the work. I'll test this out when I get the chance, but it won't be for a few days :-)
from elasticsearch-hadoop.
Hi Boyd,
I think I've found (and fixed) the issue. Pig complex types were not handled properly when reading them back from Pig. Note that the conversion (not just for Pig but Hive, M/R etc...) will be overhauled however it should be working just fine now - the only issue is that bags are converted to tuples when are deserialized (and that's because we don't hold yet any extra information to allow us to differentiate between tuple and bags).
However this is something we plan to fix in the future.
It would be great if you could try out the latest master - see the readme on how to get the latest nightly build (I've just pushed one right now: http://build.elasticsearch.org/browse/ESHADOOP-NIGHTLY-40
from elasticsearch-hadoop.
Hi Costin, I've been on vacation since the 3rd, so I'm just now getting the
chance to look at this. I'll test it out and get back to you :-)
On Sat, May 4, 2013 at 3:19 AM, Costin Leau [email protected]:
Hi Boyd,
I think I've found (and fixed) the issue. Pig complex types were not
handled properly when reading them back from Pig. Note that the conversion
(not just for Pig but Hive, M/R etc...) will be overhauled however it
should be working just fine now - the only issue is that bags are converted
to tuples when are deserialized (and that's because we don't hold yet any
extra information to allow us to differentiate between tuple and bags).
However this is something we plan to fix in the future.It would be great if you could try out the latest master - see the readme
on how to get the latest nightly build (I've just pushed one right now:
http://build.elasticsearch.org/browse/ESHADOOP-NIGHTLY-40—
Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-17429716
.
from elasticsearch-hadoop.
Costin, the fix works. However, the performance is pretty poor - I was able to process 37500 records and write them to JsonStorage, but it took about 45 minutes, I'm not sure if it's related to the fix or not.
I tested the version of the fix pointed to by that commit, I have not tested anything later than that.
from elasticsearch-hadoop.
Note that there's an upcoming serialization improvement for writing to ES coming hopefully in the next few days.
It sounds though as this is not what you're doing - can you share your test (through a gist/email/pm maybe)?
You mention JsonStorage but I'm not sure why you would want to use since it adds the overhead of converting to JSON which we already handle.
Can you explain your use case more?
from elasticsearch-hadoop.
Related Issues (20)
- Does elasticsearch-hadoop support IPv6 addresses HOT 1
- ELK to Databricks Data load HOT 1
- hello, is async http support? HOT 1
- Nested objects fail parsing in Spark SQL when empty objects present
- Latency Spike during Spark Structured Streaming HOT 2
- Upgrade to Spark 3.4.x HOT 3
- Policy about type name in index name is too harsh HOT 3
- Unable to build the newly cloned project due to invalid dependency paths
- Spark dependency is not compatible resulting in compile error HOT 1
- 7.17.11 failed backwards compatibility for 5.5.3 HOT 4
- [Bug][CVE-2019-10172] found CVE in the latest release 8.12.2 and 8.9.1 HOT 1
- Es.write.operation documentation is deceptive on default values when used via spark HOT 1
- spark read long datatype error HOT 3
- ES-hadoop is not compatible with spark 3.5.1 HOT 5
- Stop using deprecated "stored" field in scripts for updates
- Automatic index creation fails with Elasticsearch >= 8.6.0 HOT 6
- Option es.read.field.*.include unable to take field names containing a colon
- Unable to index with elasticsearch-spark on serverless elasticsearch HOT 1
- What's the status on Elasticsearch 8.13 support? HOT 3
- Add support for creating suggester fields with weights
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-hadoop.