[ https://issues.apache.org/jira/browse/HBASE-4634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133045#comment-13133045 ]
nkeywal commented on HBASE-4634: -------------------------------- I am going to attach a second version of the patch. I checked indent, it seems ok to me. It took more time than expected because I haven't managed to escape some modifications to the get files functions. Not much impacts for the user. Basically, there is now a clear distinction between: - base directory: configurable directory where all tests put their data - data directory: sub directory used by the test - cluster directory: subdirectory for the cluster stuff (dfs or hbase) This will help to have multiple HBaseTestingUtility in the same JVM (// or not). I have also removed a duplicate getter (something as getHbaseCluster while getHBase cluster exists). It includes the fixes for HBASE-4639 and most if not all the bad usage mentioned in HBASE-4326 (but I did not fix the root issue of HBASE-4326). It seems to work on my env, currently n-checking again. I have a systematic errors in the test, but it's in #org.apache.hadoop.hbase.io.hfile.TestHFileBlock#testBlockHeapSize , I believe it was there at the beginning. I have random errors in: TestDistributedLogSplitting, regionserver.TestServerCustomProtocol, client.TestAdmin master.TestHMasterRPCException, coprocessor.TestRegionServerCoprocessorExceptionWithAbort, wal.TestLogRolling, CatalogTrackerOnCluster and a few else, but it works when I replay the test set, so I tend to think they belong to the flaky test sets. At the end of the day, the patch is not that medium... Sorry for that. Will add a new comment when the tests will be over and I will have rechecked the flaky one, but you can already have a look. > "test.build.data" property overused leading to write data at the wrong place > ---------------------------------------------------------------------------- > > Key: HBASE-4634 > URL: https://issues.apache.org/jira/browse/HBASE-4634 > Project: HBase > Issue Type: Bug > Components: test > Affects Versions: 0.92.0 > Environment: all > Reporter: nkeywal > Assignee: nkeywal > Attachments: 2011020_4634_all.patch, 20111020_4639_TestStoreFile.patch > > > "test.build.data" is overloaded in HBase.At the beginning, it's the "Default > parent directory for test output.", but then it's rewritten to be the > directory itself in functions like HBaseTestingUtility#startMiniDFSCluster > It seems that this value is already used by MiniDFS (i.e. outside of HBase): > "Name is as it is because mini dfs has hard-codings to put test data here." > As it is today, there is at least a bug in HBaseTestingUtility: > {noformat} > public void initTestDir() { > if (System.getProperty(TEST_DIRECTORY_KEY) == null) { > clusterTestBuildDir = setupClusterTestBuildDir(); > System.setProperty(TEST_DIRECTORY_KEY, clusterTestBuildDir.getPath()); > } > } > {noformat} > if you set a value for "test.build.data", the test dir will be the parent > directory and not a temp subdir, leading to issues as multiple tests will > end-ups in the same (bad) directory. This function is barely used today, > hence it's not visible, but I would like to use it in some new code. > A possible fix is to remove the check for null and continue with the > overloading, but I don't think it would be a big issue to create a new > key(like "test.build.data.rootdirectory") specific to the root directory and > to use "test.build.data" only to communicate with MiniDFS. Feedback welcome. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira