hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Kanter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13254) Create framework for configurable disk checkers
Date Tue, 05 Jul 2016 22:27:11 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-13254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15363388#comment-15363388

Robert Kanter commented on HADOOP-13254:

I'm concerned about this code in {{DiskValidatorFactory}}:
	      diskValidator = ReflectionUtils.newInstance(clazz, null);
	      // check the return of putIfAbsent() to see if any other thread have put
	      // the instance with the same key into INSTANCES
	      DiskValidator diskValidatorRet =
	          INSTANCES.putIfAbsent(clazz, diskValidator);
	      if (diskValidatorRet != null) {
	        diskValidator = diskValidatorRet;
If the implementation of {{DiskValidator}} that is being created does something like starting
some threads, and {{putIfAbsent}} returns a previous instantiation of the class, then we might
have a problem.  For example, if you have a {{DiskValidator}} that starts off a background
thread to poll SMART status, you might end up with multiple background threads doing this.

> Create framework for configurable disk checkers
> -----------------------------------------------
>                 Key: HADOOP-13254
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13254
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>            Reporter: Yufei Gu
>            Assignee: Yufei Gu
>         Attachments: HADOOP-13254.001.patch, HADOOP-13254.002.patch, HADOOP-13254.003.patch,
HADOOP-13254.004.patch, HADOOP-13254.005.patch, HADOOP-13254.006.patch, HADOOP-13254.007.patch,

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org

View raw message