You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Josh Elser (JIRA)" <ji...@apache.org> on 2016/09/14 23:55:20 UTC
[jira] [Comment Edited] (ACCUMULO-4458) lock contention around
configuration settings impacts tablet server performance
[ https://issues.apache.org/jira/browse/ACCUMULO-4458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15491807#comment-15491807 ]
Josh Elser edited comment on ACCUMULO-4458 at 9/14/16 11:55 PM:
----------------------------------------------------------------
{code}
@@ -63,20 +64,19 @@ import com.google.common.base.Joiner;
*/
public class HdfsZooInstance implements Instance {
+ private final AccumuloConfiguration site = SiteConfiguration.getInstance();
+
private HdfsZooInstance() {
- AccumuloConfiguration acuConf = SiteConfiguration.getInstance();
- zooCache = new ZooCacheFactory().getZooCache(acuConf.get(Property.INSTANCE_ZK_HOST), (int) acuConf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT));
+ zooCache = new ZooCacheFactory().getZooCache(site.get(Property.INSTANCE_ZK_HOST), (int) site.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT));
}
- private static HdfsZooInstance cachedHdfsZooInstance = null;
+ private static final HdfsZooInstance cachedHdfsZooInstance = new HdfsZooInstance();
- public static synchronized Instance getInstance() {
- if (cachedHdfsZooInstance == null)
- cachedHdfsZooInstance = new HdfsZooInstance();
+ public static Instance getInstance() {
return cachedHdfsZooInstance;
}
- private static ZooCache zooCache;
+ private final ZooCache zooCache;
private static String instanceId = null;
private static final Logger log = Logger.getLogger(HdfsZooInstance.class);
{code}
Is making {{ZooCache}} not {{static}} intentional? That seems like it would have serious implications (number of watchers would spike).
was (Author: elserj):
{code{}
@@ -63,20 +64,19 @@ import com.google.common.base.Joiner;
*/
public class HdfsZooInstance implements Instance {
+ private final AccumuloConfiguration site = SiteConfiguration.getInstance();
+
private HdfsZooInstance() {
- AccumuloConfiguration acuConf = SiteConfiguration.getInstance();
- zooCache = new ZooCacheFactory().getZooCache(acuConf.get(Property.INSTANCE_ZK_HOST), (int) acuConf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT));
+ zooCache = new ZooCacheFactory().getZooCache(site.get(Property.INSTANCE_ZK_HOST), (int) site.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT));
}
- private static HdfsZooInstance cachedHdfsZooInstance = null;
+ private static final HdfsZooInstance cachedHdfsZooInstance = new HdfsZooInstance();
- public static synchronized Instance getInstance() {
- if (cachedHdfsZooInstance == null)
- cachedHdfsZooInstance = new HdfsZooInstance();
+ public static Instance getInstance() {
return cachedHdfsZooInstance;
}
- private static ZooCache zooCache;
+ private final ZooCache zooCache;
private static String instanceId = null;
private static final Logger log = Logger.getLogger(HdfsZooInstance.class);
{code}
Is making {{ZooCache}} not {{static}} intentional? That seems like it would have serious implications (number of watchers would spike).
> lock contention around configuration settings impacts tablet server performance
> -------------------------------------------------------------------------------
>
> Key: ACCUMULO-4458
> URL: https://issues.apache.org/jira/browse/ACCUMULO-4458
> Project: Accumulo
> Issue Type: Bug
> Components: tserver
> Affects Versions: 1.7.1, 1.8.0
> Reporter: Sean Busbey
> Assignee: Sean Busbey
> Priority: Critical
> Fix For: 1.7.3, 1.8.1, 2.0.0
>
> Attachments: ACCUMULO-4458-1.7.v1.patch
>
>
> While investigating a pretty severe performance regression comparing YCSB against 1.6 and 1.7, I found a fair bit of lock contention around getting configuration values. This was improved by ACCUMULO-4388, but various threads eventually all started contending on the configuration values expected from the site xml files.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)