Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 11-18-2016 09:44 AM
Below is my source in HDFS: /abc/
Hadoop is an open source
MR is to process data in hadoop.
Hadoop has a good eco system.
I want to do below opearation filter_records = FILTER ya BY $0 MATCHES '.*Hadoop.*'; but load command is unsuccessful.Could anybody provide input on load statement? grunt> ya = load '/abc/' USING TextLoader(); 2016-11-17 21:00:14,470 [main] WARN org.apache.pig.newplan.BaseOperatorPlan - Encountered Warning IMPLICIT_CAST_TO_CHARARRAY 1 time(s). grunt> yab = load '/abc/'; 2016-11-17 21:00:50,199 [main] WARN org.apache.pig.newplan.BaseOperatorPlan - Encountered Warning IMPLICIT_CAST_TO_CHARARRAY 1 time(s). grunt>
Created 11-18-2016 02:16 PM
From the information given, there is not a load problem just an explicit warning that the data loaded is being cast to chararray (string) during the filter operation.
A couple points:
http://pig.apache.org/docs/r0.16.0/basic.html#Data+Types+and+More
Not sure if that is what you were looking for ... if so, let me know by accepting the answer; if not, let me know more specifics.
Created 11-18-2016 02:16 PM
From the information given, there is not a load problem just an explicit warning that the data loaded is being cast to chararray (string) during the filter operation.
A couple points:
http://pig.apache.org/docs/r0.16.0/basic.html#Data+Types+and+More
Not sure if that is what you were looking for ... if so, let me know by accepting the answer; if not, let me know more specifics.
Created 11-18-2016 05:20 PM
Hi @Greg Keys
Thanks for input.your input is always appreciated.one clarification
Then I should get warning during below filter statement but why i got warning during load statement.In load statement i am not converting bytearray to chararray. Then why i got warning during load statement?
filter_records = FILTER ya BY $0 MATCHES '.*Hadoop.*';
Created 11-18-2016 05:55 PM
Yes, I saw that. In my environment I got it only during filter and not the load.
In any case, it is just a warning to let you know nothing invisible is happening under the scenes.
Created 11-21-2016 10:29 AM
Hi @Greg Keys.
1)after using USING PigStorage() as (str:chararray); Issue is resolved.Thanks for your valuable time.
Created 11-21-2016 12:10 PM
Glad it worked out Vamsi 🙂