Re: Logs and in memory operations

2010-09-03 Thread Mahadev Konar
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"  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



Re: Logs and in memory operations

2010-08-31 Thread Patrick Hunt
On Mon, Aug 30, 2010 at 1:11 PM, Avinash Lakshman <
avinash.laksh...@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


Logs and in memory operations

2010-08-30 Thread Avinash Lakshman
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