Merge pull request #2608 from gaodayue/hdfs_federation_support

support Federationed HDFS
This commit is contained in:
Fangjin Yang 2016-03-08 20:41:13 -08:00
commit 94da1f8f59
1 changed files with 2 additions and 1 deletions

View File

@ -392,6 +392,7 @@ public class JobHelper
// TODO: Make this a part of Pushers or Pullers
switch (outputFS.getScheme()) {
case "hdfs":
case "viewfs":
loadSpec = ImmutableMap.<String, Object>of(
"type", "hdfs",
"path", indexOutURI.toString()
@ -547,7 +548,7 @@ public class JobHelper
DataSegment segment
)
{
String segmentDir = "hdfs".equals(fileSystem.getScheme())
String segmentDir = "hdfs".equals(fileSystem.getScheme()) || "viewfs".equals(fileSystem.getScheme())
? DataSegmentPusherUtil.getHdfsStorageDir(segment)
: DataSegmentPusherUtil.getStorageDir(segment);
return new Path(prependFSIfNullScheme(fileSystem, basePath), String.format("./%s", segmentDir));