IMPALA-10087: IMPALA-6050 causes alluxio not to be supported

This change adds file type support for alluxio.
Alluxio URLs have a different prefix
such as:alluxio://zk@zk-1:2181,zk-2:2181,zk-3:2181/path/

Testing:
Add unit test for alluxio file system type checks.

Change-Id: Id92ec9cb0ee241a039fe4a96e1bc2ab3eaaf8f77
Reviewed-on: http://gerrit.cloudera.org:8080/16379
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
diff --git a/fe/src/main/java/org/apache/impala/common/FileSystemUtil.java b/fe/src/main/java/org/apache/impala/common/FileSystemUtil.java
index 38b1ddd..b4a41b2 100644
--- a/fe/src/main/java/org/apache/impala/common/FileSystemUtil.java
+++ b/fe/src/main/java/org/apache/impala/common/FileSystemUtil.java
@@ -422,7 +422,8 @@
     HDFS,
     LOCAL,
     S3,
-    OZONE;
+    OZONE,
+    ALLUXIO;
 
     private static final Map<String, FsType> SCHEME_TO_FS_MAPPING =
         ImmutableMap.<String, FsType>builder()
@@ -433,6 +434,7 @@
             .put("hdfs", HDFS)
             .put("s3a", S3)
             .put("o3fs", OZONE)
+            .put("alluxio", ALLUXIO)
             .build();
 
     /**
diff --git a/fe/src/test/java/org/apache/impala/common/FileSystemUtilTest.java b/fe/src/test/java/org/apache/impala/common/FileSystemUtilTest.java
index 030961a..da5e11e 100644
--- a/fe/src/test/java/org/apache/impala/common/FileSystemUtilTest.java
+++ b/fe/src/test/java/org/apache/impala/common/FileSystemUtilTest.java
@@ -21,6 +21,7 @@
 import static org.apache.impala.common.FileSystemUtil.isIgnoredDir;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
@@ -84,6 +85,13 @@
     assertFalse(isIgnoredDir(new Path(TEST_TABLE_PATH + "/part=100/datafile")));
   }
 
+  @Test
+  public void testAlluxioFsType() {
+    Path path = new Path("alluxio://zk@zk-1:2181,zk-2:2181,zk-3:2181/path/");
+    assertEquals(FileSystemUtil.FsType.ALLUXIO,
+        FileSystemUtil.FsType.getFsType(path.toUri().getScheme()));
+  }
+
   private boolean testIsInIgnoredDirectory(Path input) {
     return testIsInIgnoredDirectory(input, true);
   }