[ 
https://issues.apache.org/jira/browse/LENS-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14307839#comment-14307839
 ] 

Himanshu Gahlaut commented on LENS-273:
---------------------------------------

As a fast work around for this issue,  we are going to create a separate lock 
for locking state persistence code in LensServices class instead of class level 
synchronization. 

Also, currently we create an instance of 
org.apache.hadoop.fs.FileSystem.FSDataOutputStream to write state of objects to 
file system. The default buffer size in hadoop code for instance of 
FSDataOutputStream is 4096 bytes. Have done some maths to figure out the size 
of object states to be persisted. It is coming out to be 100K. Planning to 
increase the buffer to 1 MB which we are guessing will make all writes to 
FSDataOutputStream (spread across various lens classes) an in memory 
synchronized operation instead of a file system write synchronized operation. 
This is a fast workaround. Have parked LENS-279 to implement a better solution. 
Buffer size will be configurable.

[~sriksun] [~rohitchattar] Let me know if there could be any possible side 
effects of increasing the buffer size to 1 MB.

> Persisting server state should not lock LensServices
> ----------------------------------------------------
>
>                 Key: LENS-273
>                 URL: https://issues.apache.org/jira/browse/LENS-273
>             Project: Apache Lens
>          Issue Type: Bug
>          Components: server
>            Reporter: Amareshwari Sriramadasu
>            Priority: Critical
>             Fix For: 2.1
>
>
> We are seeing issues when writing to HDFS which locked LensServices, the 
> requests on Lens are waiting to lock LensServices again.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to