You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Avinash Lakshman <av...@gmail.com> on 2010/08/30 22:11:42 UTC
Logs and in memory operations
Hi All
>From my understanding when a znode is updated/created a write happens into
the local transaction logs and then some in-memory data structure is updated
to serve the future reads.
Where in the source code can I find this? Also how can I decide when it is
ok for me to delete the logs off disk?
Please advice.
Cheers
Avinash
Re: Logs and in memory operations
Posted by Patrick Hunt <ph...@apache.org>.
On Mon, Aug 30, 2010 at 1:11 PM, Avinash Lakshman <
avinash.lakshman@gmail.com> wrote:
> From my understanding when a znode is updated/created a write happens into
> the local transaction logs and then some in-memory data structure is
> updated
> to serve the future reads.
> Where in the source code can I find this? Also how can I decide when it is
> ok for me to delete the logs off disk?
>
The bits where the in-memory db is updated is here:
org.apache.zookeeper.server.FinalRequestProcessor.processRequest(Request)
Regarding datadir cleanup see this section of the docs.
http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html#Ongoing+Data+Directory+Cleanup
Basically -- there's a tool for that but you should backup the current state
of the database before doing the cleanup.
Patrick
Re: Logs and in memory operations
Posted by Mahadev Konar <ma...@yahoo-inc.com>.
Hi Avinash,
IN the source code the FinalRequestProcessor updates the in memory data structures and the SyncRequestProcessor logs to disk.
For deciding when to delete take a look at PurgeTxnLog.java file.
Thanks
mahadev
On 8/30/10 1:11 PM, "Avinash Lakshman" <av...@gmail.com> wrote:
Hi All
>From my understanding when a znode is updated/created a write happens into
the local transaction logs and then some in-memory data structure is updated
to serve the future reads.
Where in the source code can I find this? Also how can I decide when it is
ok for me to delete the logs off disk?
Please advice.
Cheers
Avinash