[
https://issues.apache.org/jira/browse/HBASE-20984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16723208#comment-16723208
]
Sean Busbey commented on HBASE-20984:
-------------------------------------
{quote}
{code}
562 if
(fs.getUri().getScheme().equals(FileSystem.getLocal(conf).getUri().getScheme()))
{ 562 if
(fs.getUri().getScheme().equals(FileSystem.getLocal(conf).getUri().getScheme()))
{
563 newDataTestDir = new Path(getDataTestDir(), randomStr); 563
newDataTestDir = new Path("file:///"+getDataTestDir(), randomStr);
564 File dataTestDir = new File(newDataTestDir.toString()); 564
File dataTestDir = new File(newDataTestDir.toString());
565 if (deleteOnExit()) dataTestDir.deleteOnExit(); 565
if (deleteOnExit()) dataTestDir.deleteOnExit();
566 } else { 566 } else {
{code}
{quote}
this is a little brittle, since it assumes the scheme for the Filesystem
returned by {{FileSystem.getLocal(conf)}} will be {{file://}}, but that's
unlikely to change anytime soon. (unless the Hadoop encrypted filesystem
supports directly wrapping a local fs instance?)
Could you change this to use {{makeQualified}} from the {{fs}} instead of
inserting a scheme in the string? Or does that break things?
> Add/Modify test case to check custom hbase.wal.dir outside hdfs filesystem
> --------------------------------------------------------------------------
>
> Key: HBASE-20984
> URL: https://issues.apache.org/jira/browse/HBASE-20984
> Project: HBase
> Issue Type: Bug
> Components: test, wal
> Reporter: Sakthi
> Assignee: Sakthi
> Priority: Minor
> Attachments: hbase-20984.master.001.patch,
> hbase-20984.master.002.patch
>
>
> The currentĀ setup in TestWALFactory tries to create custom WAL directory
> outside hdfs but ends up creating a custom WAL directory inside hdfs. InĀ
> TestWALFactory.java:
> {code:java}
> public static void setUpBeforeClass() throws Exception {
> CommonFSUtils.setWALRootDir(TEST_UTIL.getConfiguration(), new
> Path("file:///tmp/wal")); // A local filesystem WAL is attempted
> ...
> hbaseDir = TEST_UTIL.createRootDir();
> hbaseWALDir = TEST_UTIL.createWALRootDir(); // But a directory inside
> hdfs is created here using HBaseTestingUtility#getNewDataTestDirOnTestFS
> }
> {code}
> The change was made in HBASE-20723
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)