[prev in list] [next in list] [prev in thread] [next in thread] 

List:       avro-user
Subject:    Re: How to use Apache Avro to encode the data and write it to a hashmap?
From:       Lewis John Mcgibbney <lewis.mcgibbney () gmail ! com>
Date:       2014-05-12 14:59:29
Message-ID: CAGaRif2xnVTqChM=J3MKGfX7wgPBWisd498VUfX1AW4o2c_VEQ () mail ! gmail ! com
[Download RAW message or body]

Hi Akram,
I hope this helps... let me know

When we put() [0] data in to Cassandra via Gora we first push into a
Collections.synchronizedMap(new LinkedHashMap<K, T>()) which acts as a
buffer for fields pending to be stored.
You can also refer to flush() method which itself calls addOrUpdate [1].
This is all Avro-based and hopefully there is something which will help you
out.
Lewis

0]
https://github.com/apache/gora/blob/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java#L405
 [1]
https://github.com/apache/gora/blob/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java#L484



On Thu, May 8, 2014 at 8:50 PM, Akram <akram.sa18@gmail.com> wrote:

> Can anyone help me on this? Any idea what can be done in this case?
> A simple example basis on my code will help me to understand better...
> 
> 
> 
> --
> View this message in context:
> http://apache-avro.679487.n3.nabble.com/How-to-use-Apache-Avro-to-encode-the-data-and-write-it-to-a-hashmap-tp4029920p4029921.html
>  Sent from the Avro - Users mailing list archive at Nabble.com.
> 



-- 
*Lewis*


[Attachment #3 (text/html)]

<div dir="ltr"><div><div><div><div>Hi Akram,<br></div>I hope this helps... let me \
know<br><br></div>When we put() [0] data in to Cassandra via Gora we first push into \
a <span class="">Collections</span><span class="">.</span><span \
class="">synchronizedMap</span><span class="">(</span><span class="">new</span> <span \
class="">LinkedHashMap</span><span class="">&lt;</span><span class="">K</span><span \
class="">,</span> <span class="">T</span><span class="">&gt;()) which acts as a \
buffer for fields pending to be stored.<br> </span></div><span class="">You can also \
refer to flush() method which itself calls addOrUpdate [1]. This is all Avro-based \
and hopefully there is something which will help you \
out.<br></span></div>Lewis<br><div><span class=""></span><div> <br>0] <a \
href="https://github.com/apache/gora/blob/trunk/gora-cassandra/src/main/java/org/apach \
e/gora/cassandra/store/CassandraStore.java#L405">https://github.com/apache/gora/blob/t \
runk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java#L405</a><br>
 [1] <a href="https://github.com/apache/gora/blob/trunk/gora-cassandra/src/main/java/o \
rg/apache/gora/cassandra/store/CassandraStore.java#L484">https://github.com/apache/gor \
a/blob/trunk/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java#L484</a><br>
 </div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, \
May 8, 2014 at 8:50 PM, Akram <span dir="ltr">&lt;<a \
href="mailto:akram.sa18@gmail.com" \
target="_blank">akram.sa18@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Can anyone help me on this? Any idea what can be done in this \
case?<br> A simple example basis on my code will help me to understand better...<br>
<br>
<br>
<br>
--<br>
View this message in context: <a \
href="http://apache-avro.679487.n3.nabble.com/How-to-use-Apache-Avro-to-encode-the-data-and-write-it-to-a-hashmap-tp4029920p4029921.html" \
target="_blank">http://apache-avro.679487.n3.nabble.com/How-to-use-Apache-Avro-to-encode-the-data-and-write-it-to-a-hashmap-tp4029920p4029921.html</a><br>


Sent from the Avro - Users mailing list archive at Nabble.com.<br>
</blockquote></div><br><br clear="all"><br>-- <br><font style="font-family:courier \
new,monospace;background-color:rgb(255,255,255);color:rgb(51,102,255)" \
size="4"><i>Lewis</i></font><span \
style="background-color:rgb(255,255,255);color:rgb(51,102,255)"></span> <br>

</div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic