hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manjeet Singh <manjeet.chand...@gmail.com>
Subject Re: Avro schema getting changed dynamically
Date Tue, 30 Aug 2016 06:28:13 GMT
I want ot add few more points

I am using Java native Api for Hbase get/put

and below is the example

assume i have below schema and I am inserting data by using this schema
into Hbase but later I have new new values coming and i need to fit this
into my schema for this I need to create new schema as showing in below
example
in example 2 I have new field time stamp

example 1
{ "type" : "record", "name" : "twitter_schema", "namespace" :
"com.miguno.avro", "fields" : [ { "name" : "username", "type" : "string",
"doc" : "Name of the user account on Twitter.com" }, { "name" : "tweet",
"type" : "string", "doc" : "The content of the user's Twitter message" } ] }


example 2


{ "type" : "record", "name" : "twitter_schema", "namespace" :
"com.miguno.avro", "fields" : [ { "name" : "username", "type" : "string",
"doc" : "Name of the user account on Twitter.com" }, { "name" : "tweet",
"type" : "string", "doc" : "The content of the user's Twitter message" }, {
"name" : "timestamp", "type" : "long", "doc" : "Unix epoch time in seconds"
} ], }




Thanks
Manjeet





On Tue, Aug 30, 2016 at 11:47 AM, Manjeet Singh <manjeet.chandhok@gmail.com>
wrote:

> Hi All,
>
> I have use case to put data in avro format in Hbase , I have frequent read
> write operations but its not a problem.
>
> Problem is what if my avro schema get changed how shuld I deal with it?
> This should in mind what about older data which already inserted in Hbase
> and now we have new schema.
>
> can anyone suggest me solution for the same
>
> Thanks
> Manjeet
>
> --
> luv all
>



-- 
luv all

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message