eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yonzhang2...@apache.org
Subject incubator-eagle git commit: Convert fid, uid in MapRs audit log to FIle/folder name, user name EAGLE-283: Convert fid, uid in MapR audit log to FIle/folder name, user name Author: Daniel Zhou <dazhou@apache.org> Reviewer: Yong Zhang Close: #283
Date Wed, 10 Aug 2016 22:37:03 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/develop 17bd3b897 -> e2532a1db


Convert fid,uid in MapRs audit log to FIle/folder name, user name
EAGLE-283: Convert fid,uid in MapR audit log to FIle/folder name, user name
Author: Daniel Zhou <dazhou@apache.org>
Reviewer: Yong Zhang
Close: #283


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/e2532a1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/e2532a1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/e2532a1d

Branch: refs/heads/develop
Commit: e2532a1dbd564ce5b857ea1f720e83579a3f9680
Parents: 17bd3b8
Author: yonzhang <yonzhang2012@gmail.com>
Authored: Wed Aug 10 15:40:48 2016 -0700
Committer: yonzhang <yonzhang2012@gmail.com>
Committed: Wed Aug 10 15:40:48 2016 -0700

----------------------------------------------------------------------
 eagle-jpm/eagle-jpm-util/pom.xml                |   4 +
 .../src/main/resources/maprFSAuditLog-init.sh   |  10 +-
 .../eagle-security-maprfs-web/pom.xml           |   8 +
 .../security/hdfs/MAPRFSResourceConstants.java  |  33 ++++
 .../hdfs/resolver/MAPRFSResourceResolver.java   | 135 ++++++++++++++
 .../hdfs/resolver/MAPRFSVolumeResolver.java     |  99 ++++++++++
 .../hdfs/resolver/MAPRStatusCodeResolver.java   |  24 ++-
 .../service/security/hdfs/rest/HttpRequest.java |  75 ++++++++
 .../hdfs/rest/MAPRFSResourceWebResource.java    |  73 ++++++++
 .../security/hdfs/rest/MapRNameResolver.java    | 181 +++++++++++++++++++
 .../security/hdfs/rest/HttpRequestTest.java     |  30 +++
 .../hdfs/rest/MapRNameResolverTest.java         |  30 +++
 .../app/public/feature/common/controller.js     |  49 +++++
 .../src/main/webapp/app/public/js/app.config.js |  19 ++
 .../webapp/app/public/js/srv/entitiesSrv.js     |  20 ++
 pom.xml                                         |  36 ++--
 16 files changed, 805 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-jpm/eagle-jpm-util/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-util/pom.xml b/eagle-jpm/eagle-jpm-util/pom.xml
index ed7f658..3df73e7 100644
--- a/eagle-jpm/eagle-jpm-util/pom.xml
+++ b/eagle-jpm/eagle-jpm-util/pom.xml
@@ -55,6 +55,10 @@
       </exclusions>
     </dependency>
     <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+    </dependency>
+    <dependency>
       <groupId>commons-codec</groupId>
       <artifactId>commons-codec</artifactId>
       <version>1.9</version>

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
index 5f99190..6151732 100644
--- a/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
+++ b/eagle-security/eagle-security-maprfs-auditlog/src/main/resources/maprFSAuditLog-init.sh
@@ -32,7 +32,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
            "application":"maprFSAuditLog"
         },
         "enabled": true,
-        "config": "classification.fs.defaultFS=maprfs:///"
+        "config": "classification.fs.defaultFS=hdfs://sandbox.mapr:7222\nclassification.mapr.webhttps=https://sandbox.mapr:8443\nclassification.mapr.username=mapr\nclassification.mapr.password=mapr"
      }
   ]
   '
@@ -48,7 +48,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
         "alias":"MapRFSAuditLogMonitor",
         "groupName":"MapR",
         "features":["common","metadata", "classification"],
-	"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"hdfsResource\"\n\t}\n}"
+	"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"fileSensitivity\",\n\t\t\"service\": \"FileSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"filedir\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"folder\",\n\t\t\"api\": \"maprfsResource\"\n\t}\n}"
      }
   ]
   '
@@ -126,7 +126,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
        "attrDescription": "volume name in mapr",
        "attrType": "string",
        "category": "",
-       "attrValueResolver": ""
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.MAPRFSVolumeResolver"
     },
     {
        "tags": {
@@ -137,7 +137,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
        "attrDescription": "destination file or directory, such as /tmp",
        "attrType": "string",
        "category": "",
-       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.MAPRFSResourceResolver"
     },
     {
        "tags": {
@@ -148,7 +148,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
        "attrDescription": "source file or directory, such as /tmp",
        "attrType": "string",
        "category": "",
-       "attrValueResolver": "HDFSResourceResolver"
+       "attrValueResolver": "org.apache.eagle.service.security.hdfs.resolver.MAPRFSResourceResolver"
     },
     {
        "tags": {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/pom.xml
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/pom.xml b/eagle-security/eagle-security-maprfs-web/pom.xml
index 0cdd258..d51b030 100644
--- a/eagle-security/eagle-security-maprfs-web/pom.xml
+++ b/eagle-security/eagle-security-maprfs-web/pom.xml
@@ -64,6 +64,14 @@
           <artifactId>eagle-security-common</artifactId>
           <version>${project.version}</version>
       </dependency>
+      <dependency>
+          <groupId>com.mapr.hadoop</groupId>
+          <artifactId>maprfs</artifactId>
+      </dependency>
+      <dependency>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpclient</artifactId>
+      </dependency>
   </dependencies>
 </project>
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/MAPRFSResourceConstants.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/MAPRFSResourceConstants.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/MAPRFSResourceConstants.java
new file mode 100644
index 0000000..d5e5346
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/MAPRFSResourceConstants.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs;
+
+public class MAPRFSResourceConstants {
+
+    public static final String MAPRFS_RESOURCE = "/maprfsResource";
+    public static final String MAPRFS_NAME_RESOLVER = "/maprNameResolver";
+    public static final String MAPRFS_FNAME_RESOLVER =  "/fNameResolver";
+    public static final String MAPRFS_SNAME_RESOLVER =  "/sNameResolver";
+    public static final String MAPRFS_VNAME_RESOLVER = "/vNameResolver";
+    public static final String MAPRFS_LIST_VOLUME = "/rest/volume/list";
+    public static final String MAPRFS_VOLUME_INFO = "/rest/volume/info";
+    public static final String MAPRFS_APPLICATION="MAPRFSAuditLog";
+    public static final String MAPRFS_WEBUI_HTTPS="mapr.webhttps";
+    public static final String MAPRFS_USERNAME="mapr.username";
+    public static final String MAPRFS_PASSWORD="mapr.password";
+    public static final String MAPRFS_RESOURCE_RESOLVE_FORMAT_HINT ="MAPRFS Resource must be start with /";
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSResourceResolver.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSResourceResolver.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSResourceResolver.java
new file mode 100644
index 0000000..243e2fa
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSResourceResolver.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs.resolver;
+
+import com.typesafe.config.Config;
+import org.apache.eagle.security.resolver.MetadataAccessConfigRepo;
+import org.apache.eagle.service.alert.resolver.AttributeResolvable;
+import org.apache.eagle.service.alert.resolver.AttributeResolveException;
+import org.apache.eagle.service.alert.resolver.BadAttributeResolveRequestException;
+import org.apache.eagle.service.alert.resolver.GenericAttributeResolveRequest;
+import org.apache.eagle.service.security.hdfs.HDFSFileSystem;
+import org.apache.eagle.service.security.hdfs.MAPRFSResourceConstants;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+/**
+ * MAPRFS Resource Resolver
+ *
+ * Generic Resolver Will invoke this MAPRFS Resolvers
+ * Query HINT :  Resource resolve must be {\"site\":\"${site}\", \"query\"=\"{directory path}\"}
+ */
+public class MAPRFSResourceResolver implements AttributeResolvable<GenericAttributeResolveRequest,String> {
+    private final static Logger LOG = LoggerFactory.getLogger(MAPRFSResourceResolver.class);
+    /**
+     * MAPRFS Resource Resolve API
+     *
+     * returns listOfPaths
+     */
+    @Override
+    public List<String> resolve(GenericAttributeResolveRequest request)
+            throws AttributeResolveException {
+        List<String> result = new ArrayList<>();
+        MetadataAccessConfigRepo repo = new MetadataAccessConfigRepo();
+        try {
+            Config config = repo.getConfig(MAPRFSResourceConstants.MAPRFS_APPLICATION, request.getSite().trim());
+            Configuration conf = repo.convert(config);
+            HDFSFileSystem fileSystem = new HDFSFileSystem(conf);
+            String query = request.getQuery().trim();
+            List<FileStatus> fileStatuses = null;
+            if(query.endsWith("/")) {
+                fileStatuses =  fileSystem.browse(request.getQuery().trim());
+            }
+            else{
+                Matcher m = Pattern.compile("(.*/)([\\w\\s]+)").matcher(query);
+                if(m.find()) {
+                    List<FileStatus> allFileStatuses = fileSystem.browse(m.group(1));
+                    fileStatuses = matchAttribute(allFileStatuses, query);
+                }
+                else {
+                    throw new BadAttributeResolveRequestException(MAPRFSResourceConstants.MAPRFS_RESOURCE_RESOLVE_FORMAT_HINT);
+                }
+            }
+            for(FileStatus status: fileStatuses){
+                result.add(status.getPath().toUri().getPath());
+            }
+
+            LOG.info("Successfully browsed files in MAPRFS .");
+            return result;
+        } catch( Exception e ) {
+            LOG.error(" Exception in MAPRFS Resource Resolver ", e);
+            throw new AttributeResolveException(e);
+        }
+    }
+
+    /**
+     * Validate the Passed Request Object
+     * It should have Site Id and File Path
+     */
+    @Override
+    public void validateRequest(GenericAttributeResolveRequest request)
+            throws BadAttributeResolveRequestException {
+        if(LOG.isDebugEnabled()) LOG.debug(" validating MAPRFS Resource Resolve  request ...");
+        String siteId = request.getSite();
+        if( null == siteId )
+            throw new BadAttributeResolveRequestException(MAPRFSResourceConstants.MAPRFS_RESOURCE_RESOLVE_FORMAT_HINT);
+        String filePath = request.getQuery();
+        if(null == filePath){
+            throw new BadAttributeResolveRequestException(MAPRFSResourceConstants.MAPRFS_RESOURCE_RESOLVE_FORMAT_HINT);
+        }
+        if(Character.isDigit(filePath.charAt(0))){
+            //as user might input volume id directly, so we skip this check
+        }
+        else{
+            if(!filePath.startsWith("/")){
+                throw new BadAttributeResolveRequestException(MAPRFSResourceConstants.MAPRFS_RESOURCE_RESOLVE_FORMAT_HINT);
+            }
+        }
+
+        if(LOG.isDebugEnabled()) LOG.debug(" MAPRFS Resource Resolve request validated successfully...");
+    }
+
+    public List<FileStatus> matchAttribute(List<FileStatus> statuses, String target) {
+        List<FileStatus> result = new ArrayList<>();
+        Pattern pattern = Pattern.compile("^" + target);
+        for (FileStatus status : statuses) {
+            String path = status.getPath().toUri().getPath();
+            if (pattern.matcher(path).find()){
+                result.add(status);
+            }
+        }
+        if(result.size() == 0) {
+            return statuses;
+        }
+        return result;
+    }
+    /**
+     *
+     */
+    @Override
+    public Class<GenericAttributeResolveRequest> getRequestClass() {
+        return GenericAttributeResolveRequest.class;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java
new file mode 100644
index 0000000..3b7fb03
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs.resolver;
+
+import com.typesafe.config.Config;
+import org.apache.eagle.security.resolver.MetadataAccessConfigRepo;
+import org.apache.eagle.service.alert.resolver.AttributeResolvable;
+import org.apache.eagle.service.alert.resolver.AttributeResolveException;
+import org.apache.eagle.service.alert.resolver.BadAttributeResolveRequestException;
+import org.apache.eagle.service.alert.resolver.GenericAttributeResolveRequest;
+import org.apache.eagle.service.security.hdfs.MAPRFSResourceConstants;
+import org.apache.eagle.service.security.hdfs.rest.HttpRequest;
+import org.apache.hadoop.conf.Configuration;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+public class MAPRFSVolumeResolver implements AttributeResolvable<GenericAttributeResolveRequest,String> {
+
+    private final static Logger LOG = LoggerFactory.getLogger(MAPRFSVolumeResolver.class);
+
+    @Override
+    public List<String> resolve(GenericAttributeResolveRequest request) throws AttributeResolveException {
+        String query = request.getQuery().trim();
+        List<String> volumelist = new ArrayList<>();
+        MetadataAccessConfigRepo repo = new MetadataAccessConfigRepo();
+        //Call MAPR REST API to get volumes
+        try {
+            Config config = repo.getConfig(MAPRFSResourceConstants.MAPRFS_APPLICATION, request.getSite().trim());
+            Configuration conf = repo.convert(config);
+            //get user name, password, make request to mapr rest service
+            String username;
+            String password;
+            username = config.getString(MAPRFSResourceConstants.MAPRFS_USERNAME);
+            password = config.getString(MAPRFSResourceConstants.MAPRFS_PASSWORD);
+            //constuct url to query mapr volume
+            String restUrl = config.getString(MAPRFSResourceConstants.MAPRFS_WEBUI_HTTPS) + MAPRFSResourceConstants.MAPRFS_LIST_VOLUME;
+
+            JSONObject response = HttpRequest.executeGet(restUrl,username,password);
+            volumelist = extractVolumeList(response);
+            List<String> res = new ArrayList<>();
+            for(String status : volumelist) {
+                Pattern pattern = Pattern.compile("^" + query, Pattern.CASE_INSENSITIVE);
+                if(pattern.matcher(status).find()) {
+                    res.add(status);
+                }
+            }
+            if(res.size() == 0) {
+                return volumelist;
+            }
+            return res;
+        } catch( Exception e ) {
+            LOG.error(" Exception in MAPRFS Volume Resolver ", e);
+            throw new AttributeResolveException(e);
+        }
+    }
+
+    @Override
+    public void validateRequest(GenericAttributeResolveRequest request) throws BadAttributeResolveRequestException {
+        ;
+    }
+
+    @Override
+    public Class<GenericAttributeResolveRequest> getRequestClass() {
+        return GenericAttributeResolveRequest.class;
+    }
+
+
+    public List<String> extractVolumeList(JSONObject response){
+        // rest url:  https://sandbox.map.com:8443/rest/volume/list
+        List<String> result = new ArrayList<>();
+        JSONArray list = (JSONArray) response.get("data");
+        for(int i = 0; i< list.length();i++ ){
+            JSONObject element = (JSONObject) list.get(i);
+            result.add(element.getString("volumename"));
+        }
+        return result;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java
index 248c297..db1511d 100644
--- a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRStatusCodeResolver.java
@@ -25,9 +25,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 import java.util.regex.Pattern;
 
 
@@ -45,11 +43,29 @@ public class MAPRStatusCodeResolver implements AttributeResolvable<GenericAttrib
             "EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN",
             "ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","EALREADY","EINPROGRESS","ESTALE","EUCLEAN","ENOTNAM",
             "ENAVAIL","EISNAM","EREMOTEIO","EDQUOT","ENOMEDIUM","EMEDIUMTYPE","ECANCELED","ENOKEY","EKEYEXPIRED","EKEYREVOKED","EKEYREJECTED"};
+    private Map<String, String> statusCodeMap = new HashMap<String, String>();
 
     private final static String MAPRFS_STATUS_CODE_RESOLVE_FORMAT_HINT = String.format("Status code must be in {%s}", StringUtils.join(statusCodes, ","));
 
     private final static List<String> statusList = Arrays.asList(statusCodes);
 
+    public MAPRStatusCodeResolver () {
+        //construct hashmap for status code query
+        for(int i = 0; i < statusCodes.length; i++){
+            statusCodeMap.put(statusCodes[i],String.valueOf(i));
+        }
+    }
+
+    //conver human readable status code to id
+    public String getStatusCodeID(String code){
+        String id = "STATUS CODE ID NOT FOUND";
+        if(statusCodeMap.containsKey(code)) {
+            id = statusCodeMap.get(code);
+        }
+        return id;
+    }
+
+    @Override
     public List<String> resolve(GenericAttributeResolveRequest request) throws AttributeResolveException {
         String query = request.getQuery().trim();
         List<String> res = new ArrayList<>();
@@ -78,4 +94,4 @@ public class MAPRStatusCodeResolver implements AttributeResolvable<GenericAttrib
     public Class<GenericAttributeResolveRequest> getRequestClass() {
         return GenericAttributeResolveRequest.class;
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/HttpRequest.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/HttpRequest.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/HttpRequest.java
new file mode 100644
index 0000000..0f4abcb
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/HttpRequest.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs.rest;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+
+
+public class HttpRequest {
+    private static Logger LOG = LoggerFactory.getLogger(HttpRequest.class);
+    /**
+     * This method is used to create HttpGet with authentication header
+     * @param restUrl restURl of web service
+     * @return return HttpGet request based on authentication
+     * * */
+    public static JSONObject executeGet(String restUrl, String username, String password) throws Exception {
+        HttpGet get;
+        JSONObject result = new JSONObject();
+        CloseableHttpResponse response = null;
+        try {
+            CloseableHttpClient httpclient = HttpClients.createDefault();
+
+            HttpPost post = new HttpPost(restUrl);
+            String auth=new StringBuffer(username).append(":").append(password).toString();
+            byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("US-ASCII")));
+            String authHeader = "Basic " + new String(encodedAuth);
+            post.addHeader("Authorization", authHeader);
+            post.addHeader("Content-Type", "application/json");
+            response  = httpclient.execute(post);
+
+            BufferedReader rd = new BufferedReader(
+                    new InputStreamReader(response.getEntity().getContent()));
+
+            StringBuffer res = new StringBuffer();
+            String line = "";
+            while ((line = rd.readLine()) != null) {
+                res.append(line);
+            }
+            result = new JSONObject(res.toString());
+
+        } catch (IOException e) {
+            LOG.debug("Failed to execute http get request ", e);
+        } finally {
+            if(response !=null)response.close();
+        }
+        return result;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MAPRFSResourceWebResource.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MAPRFSResourceWebResource.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MAPRFSResourceWebResource.java
new file mode 100644
index 0000000..e491432
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MAPRFSResourceWebResource.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs.rest;
+
+
+import com.typesafe.config.Config;
+import org.apache.eagle.security.entity.FileStatusEntity;
+import org.apache.eagle.security.resolver.MetadataAccessConfigRepo;
+import org.apache.eagle.service.common.EagleExceptionWrapper;
+import org.apache.eagle.service.security.hdfs.HDFSFileSystem;
+import org.apache.eagle.service.security.hdfs.HDFSResourceSensitivityDataJoiner;
+import org.apache.eagle.service.security.hdfs.MAPRFSResourceConstants;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * REST Web Service to browse files and Paths in MAPRFS
+ */
+@Path(MAPRFSResourceConstants.MAPRFS_RESOURCE)
+public class MAPRFSResourceWebResource
+{
+    private static Logger LOG = LoggerFactory.getLogger(MAPRFSResourceWebResource.class);
+
+    @GET
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public HDFSResourceWebResponse getHDFSResource(@QueryParam("site") String site , @QueryParam("path") String filePath )
+    {
+        LOG.info("Starting MAPRFS Resource Browsing.  Query Parameters ==> Site :"+site+"  Path : "+filePath );
+        HDFSResourceWebResponse response = new HDFSResourceWebResponse();
+        HDFSResourceWebRequestValidator validator = new HDFSResourceWebRequestValidator();
+        MetadataAccessConfigRepo repo = new MetadataAccessConfigRepo();
+        List<FileStatusEntity> result = new ArrayList<>();
+        List<FileStatus> fileStatuses = null;
+        try {
+            validator.validate(site, filePath); // First Step would be validating Request
+            Config config = repo.getConfig(MAPRFSResourceConstants.MAPRFS_APPLICATION, site);
+            Configuration conf = repo.convert(config);
+            HDFSFileSystem fileSystem = new HDFSFileSystem(conf);
+            fileStatuses = fileSystem.browse(filePath);
+            // Join with File Sensitivity Info
+            HDFSResourceSensitivityDataJoiner joiner = new HDFSResourceSensitivityDataJoiner();
+            result = joiner.joinFileSensitivity(site, fileStatuses);
+            LOG.info("Successfully browsed files in MAPRFS .");
+        } catch( Exception ex ) {
+            response.setException(EagleExceptionWrapper.wrap(ex));
+            LOG.error(" Exception When browsing Files for the MAPRFS Path  :"+filePath+"  " , ex);
+        }
+        response.setObj(result);
+        return response;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java
new file mode 100644
index 0000000..c62c0dc
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs.rest;
+import com.mapr.fs.clicommands.MapRCliCommands;
+import com.typesafe.config.Config;
+import org.apache.commons.io.output.ByteArrayOutputStream;
+import org.apache.eagle.security.resolver.MetadataAccessConfigRepo;
+import org.apache.eagle.service.security.hdfs.MAPRFSResourceConstants;
+import org.apache.eagle.service.security.hdfs.resolver.MAPRStatusCodeResolver;
+import org.apache.hadoop.conf.Configuration;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import java.io.PrintStream;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+@Path(MAPRFSResourceConstants.MAPRFS_NAME_RESOLVER)
+public class MapRNameResolver {
+    private static Logger LOG = LoggerFactory.getLogger(MapRNameResolver.class);
+
+    private  String run(String[] cmds) throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        PrintStream ps = new PrintStream(baos);
+        PrintStream old = System.out;
+        System.setOut(ps);
+        mprcmd.run(cmds);
+        System.out.flush();
+        System.setOut(old);
+        return baos.toString().trim();
+    }
+
+    private String extractVolumeId(JSONObject response){
+        String volumeId = "VOLUME ID NOT FOUND" ;
+        JSONArray list = (JSONArray) response.get("data");
+        if(list.length()!=0) {
+            JSONObject jsonObject = (JSONObject) list.get(0);
+            volumeId = jsonObject.getString("volumeid");
+        }
+        return volumeId;
+    }
+
+    private Configuration maprConfig;
+
+    private MapRCliCommands mprcmd;
+
+
+    /**
+     * rest api : convert file/folder name to id
+     * @param fName file/folder name
+     * @param site sitename
+     * */
+    @Path(MAPRFSResourceConstants.MAPRFS_FNAME_RESOLVER)
+    @GET
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public String getFid(@QueryParam("fName") String fName, @QueryParam("site") String site) {
+        String ans = "FID NOT FOUND";
+        try{
+            MetadataAccessConfigRepo repo = new MetadataAccessConfigRepo();
+            Config typeSafeConfig= repo.getConfig(MAPRFSResourceConstants.MAPRFS_APPLICATION, site);
+            String defaultFS;
+            defaultFS = typeSafeConfig.getString("fs.defaultFS");
+            Configuration conf = new Configuration();
+            conf.set("fs.defaultFS",defaultFS);
+            mprcmd = new MapRCliCommands(conf);
+
+            ans = fNameToFid(fName);
+            return ans;
+        }catch (Exception e){
+            LOG.info("maprfs: can not convert file/dir name " + fName + "to fid", e);
+            ans = "CAN NOT RESOLVE THIS FID";
+        }
+        return ans;
+    }
+
+
+    /**
+     * rest api : convert status code  to id
+     * @param sName: status name
+     * @param site site name
+     * */
+    @Path(MAPRFSResourceConstants.MAPRFS_SNAME_RESOLVER)
+    @GET
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public String getSid(@QueryParam("sName") String sName,  @QueryParam("site") String site) {
+        String ans= "STATUS CODE ID NOT FOUND";
+        try{
+            MAPRStatusCodeResolver resolver = new MAPRStatusCodeResolver();
+            ans = resolver.getStatusCodeID(sName);
+        }catch (Exception e){
+            LOG.info("maprfs: can not convert status code to id", e);
+            ans = "CAN NOT RESOLVE THIS STATUS CODE";
+        }
+        return ans;
+    }
+
+
+    /**
+     * rest api : convert volume name to id by calling mapr's rest api
+     * @param vName volume name
+     * @param site site Name
+     * */
+    @Path(MAPRFSResourceConstants.MAPRFS_VNAME_RESOLVER)
+    @GET
+    // The Java method will produce content identified by the MIME Media type "text/plain"
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public String getVid(@QueryParam("vName") String vName, @QueryParam("site") String site) {
+        String ans= "VOLUME ID NOT FOUDN";
+        try{
+            // call mapr rest api to get corresponding id;
+            MetadataAccessConfigRepo repo = new MetadataAccessConfigRepo();
+            Config typeSafeConfig= repo.getConfig(MAPRFSResourceConstants.MAPRFS_APPLICATION, site);
+            String username;
+            String password;
+            username = typeSafeConfig.getString(MAPRFSResourceConstants.MAPRFS_USERNAME);
+            password = typeSafeConfig.getString(MAPRFSResourceConstants.MAPRFS_PASSWORD);
+            // call
+            String restUrl = typeSafeConfig.getString(MAPRFSResourceConstants.MAPRFS_WEBUI_HTTPS) + MAPRFSResourceConstants.MAPRFS_VOLUME_INFO + "?name=" + vName;
+
+            JSONObject response = HttpRequest.executeGet(restUrl,username,password);
+            ans = extractVolumeId(response);
+
+        }catch (Exception e){
+            LOG.info("maprfs: can not convert volume name" + vName + " to id", e);
+        }
+        return ans;
+    }
+
+
+    public  String fidToFname(String id) throws Exception {
+        String name = "FNAME NOT FOUND";
+        String cmds[] = {"-lsfid",id};
+        String results = run(cmds);
+        Pattern pattern = Pattern.compile("\\s(/.*)\\s");
+        Matcher matcher = pattern.matcher(results);
+        if (matcher.find()){
+            name = matcher.group(1);
+        }
+        return name;
+    }
+
+    public String fNameToFid(String name) throws Exception {
+        String id = "FID NOT FOUND";
+        name = "maprfs://"+name;
+        String cmds[] = {"-lsd",name};
+        String results = run(cmds);
+        Pattern pattern = Pattern.compile("\\sp\\s([\\d\\.]+)\\s");
+        Matcher matcher = pattern.matcher(results);
+        if (matcher.find()){
+            id = matcher.group(1);
+        }
+        return id;
+    }
+
+
+
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/test/java/org/apache/eagle/service/security/hdfs/rest/HttpRequestTest.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/test/java/org/apache/eagle/service/security/hdfs/rest/HttpRequestTest.java b/eagle-security/eagle-security-maprfs-web/src/main/test/java/org/apache/eagle/service/security/hdfs/rest/HttpRequestTest.java
new file mode 100644
index 0000000..990085c
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/test/java/org/apache/eagle/service/security/hdfs/rest/HttpRequestTest.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.eagle.service.security.hdfs.rest;
+
+import org.json.JSONObject;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class HttpRequestTest {
+    @Test
+    public void TestExecuteGet() throws Exception {
+        String restUrl = "https://sandbox.mapr.com:8443/rest/volume/list";
+        JSONObject res = HttpRequest.executeGet(restUrl,"username", "password");
+        Assert.assertEquals("OK",res.getString("status"));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-security/eagle-security-maprfs-web/src/main/test/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolverTest.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-maprfs-web/src/main/test/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolverTest.java b/eagle-security/eagle-security-maprfs-web/src/main/test/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolverTest.java
new file mode 100644
index 0000000..f3a6abc
--- /dev/null
+++ b/eagle-security/eagle-security-maprfs-web/src/main/test/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolverTest.java
@@ -0,0 +1,30 @@
+package org.apache.eagle.service.security.hdfs.rest;/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class MapRNameResolverTest {
+    @Test
+    public void testResolver () {
+        MapRNameResolver resolver = new MapRNameResolver();
+        Assert.assertEquals("2049.2692.136572", resolver.getFid("/test0","mapr"));
+        Assert.assertEquals("0", resolver.getSid("success", "mapr"));
+        Assert.assertEquals("mapr.cluster.root","186635570");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
index 72af7eb..207c8df 100644
--- a/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
+++ b/eagle-webservice/src/main/webapp/app/public/feature/common/controller.js
@@ -878,12 +878,61 @@
 					}
 				};
 			};
+
+			//for maprfs, if key is status or volume or src/dst, convert these names to id.
+			$scope.convertToID = function(_condList, key, op, name,  type, site){
+				if(key == "dst" || key == "src") {
+					Entities.maprfsNameToID("fNameResolver", name, site)._promise.then(
+						function(response){
+							console.log("success");
+							console.log(response);
+							_condList.push($scope._CondUnit(key, op, response.data, type));
+						},
+						function(error, status){
+							console.log("error: " + status);
+						}
+					);
+				}
+				else if (key == "status"){
+					Entities.maprfsNameToID("sNameResolver", name, site)._promise.then(
+						function(response){
+							console.log("success");
+							console.log(response);
+							_condList.push($scope._CondUnit(key, op, response.data, type));
+						},
+						function(error, status){
+							console.log("error: " + status);
+						}
+					);
+				}
+				else if (key == "volume") {
+					Entities.maprfsNameToID("vNameResolver", name, site)._promise.then(
+						function(response){
+							console.log("success");
+							console.log(response);
+							_condList.push($scope._CondUnit(key, op, response.data, type));
+						},
+						function(error, status){
+							console.log("error: " + status);
+						}
+					);
+				}
+			};
+
 			// Add condition for policy
 			$scope.addCondition = function(key, op, value, type) {
 				if(value === "" || value === undefined) return false;
 
 				var _condList = $scope.policy.__.conditions[key] = $scope.policy.__.conditions[key] || [];
 				_condList.push($scope._CondUnit(key, op, value, type));
+
+				//if it is mapr application, covert human readable name to ids
+				if(Application.current().tags.application == "maprFSAuditLog")  {
+					if ( key == "dst" || key == "src" || key == "volume" || key == "status")  {
+						$scope.convertToID(_condList, key, op, value , type, Site.current().tags.site);
+					}
+				}
+
 				return true;
 			};
 			// Convert condition list to description string

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-webservice/src/main/webapp/app/public/js/app.config.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/app.config.js b/eagle-webservice/src/main/webapp/app/public/js/app.config.js
index ec30ccd..d7c4be9 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/app.config.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/app.config.js
@@ -40,6 +40,8 @@
 			userProfile: 'rest/authentication',
 			logout: 'logout',
 
+			maprNameResolver: '../rest/maprNameResolver',
+
 			DELETE_HOOK: {
 				FeatureDescService: 'rest/module/feature?feature=${feature}',
 				ApplicationDescService: 'rest/module/application?application=${application}',
@@ -65,6 +67,23 @@
 		return _url;
 	};
 
+	app.getMapRNameResolverURL = function(name,value, site) {
+		var key = "maprNameResolver";
+		var _path = app.config.urls[key];
+		if(!_path) throw "URL:'" + name + "' not exist!";
+		var _url = _path;
+		if(name == "fNameResolver") {
+			_url +=  "/" + name + "?fName=" + value + "&site=" + site;
+		} else if(name == "sNameResolver") {
+			_url +=  "/" + name + "?sName=" + value + "&site=" + site;
+		} else if (name == "vNameResolver") {
+			_url += "/" + name + "?vName=" + value + "&site=" + site;
+		} else{
+			throw "resolver:'" + name + "' not exist!";
+		}
+		return _url;
+	};
+
 	function getHookURL(hookType, serviceName) {
 		var _path = app.config.urls[hookType][serviceName];
 		if(!_path) return null;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js b/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js
index 879eac0..b725054 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/srv/entitiesSrv.js
@@ -130,6 +130,20 @@
 			});
 			return _list;
 		}
+		function _get(url) {
+			var _list = [];
+			_list._promise = $http({
+				method: 'GET',
+				url: url,
+				headers: {
+					"Content-Type": "text/plain"
+				}
+			}).success(function(data) {
+				// console.log(data);
+				_list.push.apply(_list, data.obj);
+			});
+			return _list;
+		}
 		function ParseCondition(condition) {
 			var _this = this;
 			_this.condition = "";
@@ -158,6 +172,12 @@
 			_query: _query,
 			_post: _post,
 
+			maprfsNameToID: function(serviceName, value, site) {
+				//var _url = "../rest/maprIDResolver/fNameResolver?fName="+name;
+				var _url = app.getMapRNameResolverURL(serviceName, value, site);
+				return _get(_url);
+			},
+
 			updateEntity: function(serviceName, entities, config) {
 				var _url;
 				config = config || {};

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/e2532a1d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ed9a0d1..c49e64b 100755
--- a/pom.xml
+++ b/pom.xml
@@ -168,7 +168,7 @@
 
         <mapr-hive.version>1.2.0-mapr-1510</mapr-hive.version>
         <mapr-hadoop.version>2.7.0-mapr-1506</mapr-hadoop.version>
-        <maprfs.version>5.0.0-mapr</maprfs.version>
+        <maprfs.version>5.1.0-mapr</maprfs.version>
         <mapr-hbase.version>0.98.9-mapr-1503</mapr-hbase.version>
 
         <spark.core.version>1.4.0</spark.core.version>
@@ -192,6 +192,7 @@
         <commons-collections.version>3.2.1</commons-collections.version>
         <commons-io.version>2.4</commons-io.version>
         <guice.version>3.0</guice.version>
+        <httpclient.version>4.5.2</httpclient.version>
 
         <!-- Configuration -->
         <archaius.version>0.6.1</archaius.version>
@@ -233,7 +234,7 @@
         <storm-kafka.version>0.10.0</storm-kafka.version>
         <storm.version>0.9.3</storm.version>
 
-        <mapr-kafka.version>0.8.1.1</mapr-kafka.version>
+        <mapr-kafka.version>0.9.0.0-mapr-1607</mapr-kafka.version>
         <mapr-kafka-clients.version>0.8.3-mapr-1509</mapr-kafka-clients.version>
         <mapr-storm-kafka.version>0.9.3</mapr-storm-kafka.version>
         <mapr-storm.version>0.9.3-mapr-1509</mapr-storm.version>
@@ -398,6 +399,16 @@
                 <artifactId>guice</artifactId>
                 <version>${guice.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.mapr.hadoop</groupId>
+                <artifactId>maprfs</artifactId>
+                <version>${maprfs.version}</version>
+             </dependency>
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient</artifactId>
+                <version>${httpclient.version}</version>
+            </dependency>
 
             <!-- Configuration -->
             <dependency>
@@ -542,6 +553,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.kafka</groupId>
+                <artifactId>kafka_${scala.version}</artifactId>
+                <version>${kafka.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.kafka</groupId>
                 <artifactId>kafka-clients</artifactId>
                 <version>${kafka-clients.version}</version>
             </dependency>
@@ -974,11 +990,6 @@
                         <version>${mapr-hbase.version}</version>
                     </dependency>
                     <dependency>
-                        <groupId>com.mapr.hadoop</groupId>
-                        <artifactId>maprfs</artifactId>
-                        <version>${maprfs.version}</version>
-                    </dependency>
-                    <dependency>
                         <groupId>org.apache.hadoop</groupId>
                         <artifactId>hadoop-client</artifactId>
                         <version>${mapr-hadoop.version}</version>
@@ -1010,11 +1021,6 @@
                     </dependency>
 
                     <dependency>
-                        <groupId>org.apache.kafka</groupId>
-                        <artifactId>kafka_${scala.version}</artifactId>
-                        <version>${mapr-kafka.version}</version>
-                    </dependency>
-                    <dependency>
                         <groupId>org.apache.storm</groupId>
                         <artifactId>storm-kafka</artifactId>
                         <version>${mapr-storm-kafka.version}</version>
@@ -1209,6 +1215,12 @@
             </releases>
         </repository>
         <repository>
+            <id>mapr-releases</id>
+            <url>http://repository.mapr.com/maven/</url>
+            <snapshots><enabled>false</enabled></snapshots>
+            <releases><enabled>true</enabled></releases>
+        </repository>
+        <repository>
             <id>siddhi cep engine</id>
             <url>http://maven.wso2.org/nexus/content/groups/wso2-public</url>
             <releases>


Mime
View raw message