Hi,
I want to create custom data provider for avro files in lingual catalog.
For that i have used AvroScheme() to create custom scheme. Also added required properties in provider.properties file. Which i have attached as provider.properties file.
Then i have executed following commands on lingual as:
lingual catalog --provider avroprovider --remove
lingual catalog --provider -add /home/hduser/avroprovider.jar
lingual catalog --schema zyxf --add
lingual catalog --schema zyxf --stereotype zyxff --add --columns id,name,city -type int,string,string
lingual catalog --schema zyxf --table zyxf --stereotype zyxff -add hdfs://UbuntuD1:8020/home/hduser/part-00000.avro --protocol hdfs --format avro
lingual shell --verbose --showstacktrace
select * from "zyxf"."zyxf";
Above 6 commands works fine for me.i.e provider,schema,stereotype and table has been successfully added to lingual catalog.
There after when i want to view the data it won't works and shows the below errors as:
2016-04-19 13:07:51,069 INFO [main] jdbc.LingualStatement (LingualStatement.java:execute(168)) - execute: select * from "zyxf"."zyxf"
{utcTimestamp=1461051462447, currentTimestamp=1461071262447, localTimestamp=1461071262447, timeZone=sun.util.calendar.ZoneInfo[id="Asia/Kolkata",offset=19800000,dstSavings=0,useDaylight=false,transitions=6,lastRule=null]}
2016-04-19 13:07:52,879 INFO [main] provider.ProviderProxy (ProviderProxy.java:createScheme(189)) - using null to create scheme for stereotype zyxff with properties: {extensions=.avro, protocols=hdfs, fieldScale=2, fieldPrecision=10, provider=avroprovider}
2016-04-19 13:07:53,397 INFO [main] provider.ProviderProxy (ProviderProxy.java:createTap(158)) - using null to create tap for Resource{identifier='hdfs://UbuntuD1:8020/home/hduser/part-00000.avro', protocol=hdfs, format=avro, mode=KEEP} with properties: {schemes=hdfs, provider=text}
2016-04-19 13:07:53,474 ERROR [main] jdbc.LingualStatement (LingualStatement.java:handleThrowable(219)) - failed with: exception while executing query ( null)
Warning: exception while executing query: null: org/apache/avro/mapred/AvroInputFormat: org.apache.avro.mapred.AvroInputFormat (state=,code=0)
Error: exception while executing query (state=,code=0)
Any One can help, Its important to read only avro files ??
Thanks
Amiya Mishra