eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [7/7] incubator-eagle git commit: EAGLE-139 EAGLE-163 Eagle UI Modularization and fix bugs in policy extensions
Date Thu, 25 Feb 2016 10:25:23 GMT
EAGLE-139 EAGLE-163 Eagle UI Modularization and fix bugs in policy extensions

https://issues.apache.org/jira/browse/EAGLE-139

Each site contains multi applications. Application works for different monitoring purpose. Add there is no communication between applications. For example, Eagle Dam is a application for security monitoring.
Each application is made up with serval features. And feature can share between applications. Feature does the basic job of the application. For example, Policies & Alerts in Eagle DAM is the base feature. Each application includes customized application using this feature wills both display the policies & Alerts in navigation bar. If you want to extend the application, you can customize feature. But avoid modify original feature for special usage.

Author:
@zombieJ <jiljiang@ebay.com>
@haoch <hao@apache.org>
@qingwen220 <qingwzhao@ebay.com>

Reviewer:
@haoch <hao@apache.org>
@qingwen220 <qingwzhao@ebay.com>
@anyway1021 <ziyang.wu@ebay.com>

Closes #103


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

Branch: refs/heads/master
Commit: d37643b0ae7c3fe22fe2794a9fa18ec74b8f9eb2
Parents: eb0734b
Author: Hao Chen <hao@apache.org>
Authored: Thu Feb 25 18:25:07 2016 +0800
Committer: Hao Chen <hao@apache.org>
Committed: Thu Feb 25 18:25:07 2016 +0800

----------------------------------------------------------------------
 .../src/main/bin/eagle-create-table.rb          |   54 +-
 .../src/main/bin/eagle-drop-tables.sh           |   26 +
 eagle-assembly/src/main/bin/eagle-env.sh        |    4 +
 .../src/main/bin/eagle-service-init.sh          |    6 +-
 .../src/main/bin/eagle-topology-init.sh         |   63 +-
 .../main/bin/hbase-securitylog-schema-create.sh |   41 -
 .../src/test/resources/str.siddhiext            |    3 +
 .../alert/resolver/SiteApplicationObject.java   |   62 ++
 .../alert/resolver/SiteApplicationResource.java |  189 ++++
 .../alert/entity/AlertDataSourceEntity.java     |    1 +
 .../alert/entity/AlertEntityRepository.java     |    7 +-
 .../entity/ApplicationDescServiceEntity.java    |   94 ++
 .../alert/entity/FeatureDescServiceEntity.java  |   59 +
 .../alert/entity/GenericResourceEntity.java     |   47 +
 .../entity/SiteApplicationServiceEntity.java    |   60 +
 .../alert/entity/SiteDescServiceEntity.java     |   48 +
 .../apache/eagle/policy/common/Constants.java   |    7 +
 .../eagle/policy/dao/AlertDataSourceDAO.java    |   25 -
 .../policy/dao/AlertDataSourceDAOImpl.java      |   61 -
 .../src/main/resources/str.siddhiext            |    4 +
 .../generic/GenericEntityServiceResource.java   |   41 +
 .../src/main/resources/hadoop-metric-init.sh    |   25 +-
 .../dao/HbaseMetadataAccessConfigDAOImpl.java   |    7 +-
 .../src/main/resources/application.conf         |    4 +-
 .../security/hdfs/HDFSResourceUtils.java        |    7 +-
 .../hdfs/resolver/HDFSCommandResolver.java      |    2 +
 .../dao/HiveMetadataAccessConfigDAOImpl.java    |   19 +-
 .../src/main/resources/eagleSecurity.xml        |    4 +-
 eagle-webservice/src/main/webapp/Gruntfile.js   |   31 +-
 eagle-webservice/src/main/webapp/app/index.html |  137 ++-
 .../webapp/app/partials/config/application.html |  103 ++
 .../webapp/app/partials/config/feature.html     |   64 ++
 .../main/webapp/app/partials/config/site.html   |   94 ++
 .../webapp/app/partials/dam/alertDetail.html    |   61 -
 .../main/webapp/app/partials/dam/alertList.html |   83 --
 .../src/main/webapp/app/partials/dam/login.html |   49 -
 .../src/main/webapp/app/partials/dam/nvd3.html  |   19 -
 .../webapp/app/partials/dam/policyDetail.html   |  171 ---
 .../webapp/app/partials/dam/policyEdit.html     |  359 ------
 .../webapp/app/partials/dam/policyList.html     |   98 --
 .../webapp/app/partials/dam/sensitivity.html    |   32 -
 .../app/partials/dam/sensitivity/folder.html    |  110 --
 .../app/partials/dam/sensitivity/table.html     |  150 ---
 .../app/partials/dam/sensitivitySummary.html    |  143 ---
 .../main/webapp/app/partials/dam/siteList.html  |  162 ---
 .../webapp/app/partials/dam/streamList.html     |  179 ---
 .../main/webapp/app/partials/dam/summary.html   |   45 -
 .../app/partials/dam/userProfileDetail.html     |   87 --
 .../app/partials/dam/userProfileList.html       |  138 ---
 .../src/main/webapp/app/partials/landing.html   |   12 +
 .../src/main/webapp/app/partials/login.html     |   49 +
 .../main/webapp/app/public/css/animation.css    |   46 +
 .../src/main/webapp/app/public/css/main.css     |  206 ++--
 .../public/feature/classification/controller.js |  269 +++++
 .../classification/page/sensitivity.html        |   40 +
 .../classification/page/sensitivity/folder.html |  110 ++
 .../classification/page/sensitivity/table.html  |  150 +++
 .../app/public/feature/common/controller.js     | 1023 +++++++++++++++++
 .../public/feature/common/page/alertDetail.html |   61 +
 .../public/feature/common/page/alertList.html   |   69 ++
 .../feature/common/page/dataSrcConfig.html      |  125 +++
 .../feature/common/page/policyDetail.html       |  172 +++
 .../public/feature/common/page/policyEdit.html  |  359 ++++++
 .../public/feature/common/page/policyList.html  |   84 ++
 .../app/public/feature/metadata/controller.js   |   66 ++
 .../feature/metadata/page/streamList.html       |   84 ++
 .../public/feature/userProfile/controller.js    |  268 +++++
 .../public/feature/userProfile/page/detail.html |   87 ++
 .../public/feature/userProfile/page/list.html   |  138 +++
 .../webapp/app/public/images/favicon_white.png  |  Bin 0 -> 1621 bytes
 .../src/main/webapp/app/public/js/app.config.js |  179 +--
 .../src/main/webapp/app/public/js/app.js        | 1042 +++++++-----------
 .../src/main/webapp/app/public/js/app.ui.js     |  140 +--
 .../src/main/webapp/app/public/js/common.js     |  435 ++++----
 .../app/public/js/ctrl/alertController.js       |  128 ---
 .../webapp/app/public/js/ctrl/authController.js |   82 +-
 .../public/js/ctrl/configurationController.js   |  332 ++++++
 .../webapp/app/public/js/ctrl/damController.js  |  111 --
 .../src/main/webapp/app/public/js/ctrl/main.js  |   42 +
 .../app/public/js/ctrl/policyController.js      |  898 ---------------
 .../app/public/js/ctrl/sensitivityController.js |  454 --------
 .../webapp/app/public/js/ctrl/siteController.js |  209 ----
 .../app/public/js/ctrl/streamController.js      |  207 ----
 .../app/public/js/ctrl/userProfileController.js |  261 -----
 .../webapp/app/public/js/srv/applicationSrv.js  |  168 +++
 .../app/public/js/srv/authorizationSrv.js       |  131 +++
 .../webapp/app/public/js/srv/entitiesSrv.js     |  281 +++++
 .../src/main/webapp/app/public/js/srv/main.js   |   19 +
 .../main/webapp/app/public/js/srv/pageSrv.js    |  131 +++
 .../main/webapp/app/public/js/srv/siteSrv.js    |  193 ++++
 .../src/main/webapp/app/public/js/srv/uiSrv.js  |  218 ++++
 .../webapp/app/public/js/srv/wrapStateSrv.js    |  109 ++
 eagle-webservice/src/main/webapp/grunt.json     |    5 +-
 eagle-webservice/src/main/webapp/package.json   |    9 +-
 94 files changed, 6969 insertions(+), 5518 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-assembly/src/main/bin/eagle-create-table.rb
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-create-table.rb b/eagle-assembly/src/main/bin/eagle-create-table.rb
index cbef6f4..b1b790c 100644
--- a/eagle-assembly/src/main/bin/eagle-create-table.rb
+++ b/eagle-assembly/src/main/bin/eagle-create-table.rb
@@ -20,42 +20,28 @@ import org.apache.hadoop.hbase.HBaseConfiguration
 import org.apache.hadoop.hbase.client.HBaseAdmin
 
 def createEagleTable(admin, tableName)
-    if !admin.tableExists(tableName)
-        # create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'GZ'}
-        create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
-	puts "Create Table #{tableName} successfully"
-    elsif admin.isTableDisabled(tableName)
-        admin.enableTable(tableName)
-	  puts "Table #{tableName} already exists"
-    else
-	  puts "Table #{tableName} already exists"
-    end
+  if !admin.tableExists(tableName)
+    # create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'GZ'}
+    create tableName, {NAME => 'f', VERSIONS => '1', BLOOMFILTER => 'ROW', COMPRESSION => 'SNAPPY'}
+    puts "Create Table #{tableName} successfully"
+  elsif admin.isTableDisabled(tableName)
+    admin.enableTable(tableName)
+    puts "Table #{tableName} already exists"
+  else
+    puts "Table #{tableName} already exists"
+  end
 end
 
 conf = HBaseConfiguration.new
 admin = HBaseAdmin.new(conf)
 
-createEagleTable(admin, 'alertdef')
-createEagleTable(admin, 'ipzone')
-createEagleTable(admin, 'streamMetadata')
-createEagleTable(admin, 'alertdetail')
-createEagleTable(admin, 'fileSensitivity')
-createEagleTable(admin, 'eaglehdfs_alert')
-createEagleTable(admin, 'streamdef')
-createEagleTable(admin, 'eagle_metric')
-createEagleTable(admin, 'alertDataSource')
-createEagleTable(admin, 'alertExecutor')
-createEagleTable(admin, 'alertStream')
-createEagleTable(admin, 'alertStreamSchema')
-createEagleTable(admin, 'hiveResourceSensitivity')
-createEagleTable(admin, 'hbaseResourceSensitivity')
-createEagleTable(admin, 'mlmodel')
-createEagleTable(admin, 'userprofile')
-createEagleTable(admin, 'hfdsusercommandpattern')
-createEagleTable(admin, 'appCommand')
-createEagleTable(admin, 'appDefinition')
-createEagleTable(admin, 'serviceAudit')
-createEagleTable(admin, 'aggregatedef')
-createEagleTable(admin, 'alertNotifications')
-
-exit
+if ARGV.empty?
+  puts "Table list is empty, please go back to bin/eagle-env.sh and export EAGLE_TABLE_LIST"
+  exit 1
+end
+
+tableListVal=ARGV.first
+
+tableListVal.split(' ').map { |i| createEagleTable(admin, i) }
+
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-assembly/src/main/bin/eagle-drop-tables.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-drop-tables.sh b/eagle-assembly/src/main/bin/eagle-drop-tables.sh
new file mode 100644
index 0000000..37fb540
--- /dev/null
+++ b/eagle-assembly/src/main/bin/eagle-drop-tables.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# 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.
+
+source $(dirname $0)/eagle-env.sh
+
+commands=''
+for i in $EAGLE_TABLE_LIST; do
+    commands="disable '$i'\ndrop '$i'\n"$commands
+done
+
+echo -e $commands | hbase shell
+#echo commands | hbase shell -n > /dev/null 2>&1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-assembly/src/main/bin/eagle-env.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-env.sh b/eagle-assembly/src/main/bin/eagle-env.sh
index 79ff5fa..cfffa0d 100755
--- a/eagle-assembly/src/main/bin/eagle-env.sh
+++ b/eagle-assembly/src/main/bin/eagle-env.sh
@@ -42,3 +42,7 @@ export EAGLE_CLASSPATH=$EAGLE_HOME/conf
 for file in $EAGLE_HOME/lib/share/*;do
 	EAGLE_CLASSPATH=$EAGLE_CLASSPATH:$file
 done
+
+# EAGLE_TABLE_LIST
+export EAGLE_TABLE_LIST='alertdef ipzone streamMetadata alertdetail fileSensitivity eaglehdfs_alert streamdef eagle_metric alertExecutor alertStream alertStreamSchema hiveResourceSensitivity hbaseResourceSensitivity mlmodel userprofile hfdsusercommandpattern appCommand appDefinition serviceAudit aggregatedef alertNotifications eagleSiteDesc eagleSiteApplication eagleApplicationDesc eagleFeatureDesc eagle_metadata'
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-assembly/src/main/bin/eagle-service-init.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-service-init.sh b/eagle-assembly/src/main/bin/eagle-service-init.sh
index 01bddb5..a9c1cb2 100755
--- a/eagle-assembly/src/main/bin/eagle-service-init.sh
+++ b/eagle-assembly/src/main/bin/eagle-service-init.sh
@@ -15,7 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-eagle_bin=$(dirname $0)
+source $(dirname $0)/eagle-env.sh
 
 ###################################################
 ###        create hbase tables for eagle
@@ -23,7 +23,7 @@ eagle_bin=$(dirname $0)
 
 echo "Creating hbase tables for eagle ... "
 
-hbase shell $eagle_bin/eagle-create-table.rb
+hbase shell ${EAGLE_HOME}/bin/eagle-create-table.rb "$EAGLE_TABLE_LIST"
 
 if [ $? = 0 ];then
 	echo "==> Successfully created hbase tables"
@@ -32,6 +32,4 @@ else
 	exit 1
 fi
 
-echo "Finished initializing for eagle service"
-
 exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-assembly/src/main/bin/eagle-topology-init.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/eagle-topology-init.sh b/eagle-assembly/src/main/bin/eagle-topology-init.sh
index 03b2a9a..2a3032e 100755
--- a/eagle-assembly/src/main/bin/eagle-topology-init.sh
+++ b/eagle-assembly/src/main/bin/eagle-topology-init.sh
@@ -24,9 +24,38 @@ eagle_bin=$EAGLE_HOME/bin
 #####################################################################
 
 ## AlertDataSource: data sources bound to sites
-echo "Importing AlertDataSourceService for HDFS... "
 
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"hdfsAuditLog"}, "enabled": "true", "config" : "{\"hdfsEndpoint\":\"hdfs://sandbox.hortonworks.com:8020\"}", "desc":"HDFS"}]'
+echo "Begin to initialize HBase tables ..."
+
+echo ""
+echo "Importing sample site ..."
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteDescService" -d '[{"prefix":"eagleSiteDesc","tags":{"site" : "sandbox"}, "enabled": true}]'
+
+echo ""
+echo "Importing applications for sample site ..."
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hdfsAuditLog"}, "enabled": true, "config" : "{\"hdfsEndpoint\":\"hdfs://sandbox.hortonworks.com:8020\"}"}]'
+
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hbaseSecurityLog"}, "enabled": true, "config" : "{\"zkClientPort\":\"2181\", \"zkQuorum\":\"localhost\"}"}]'
+
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" -d '[{"prefix":"eagleSiteApplication","tags":{"site" : "sandbox", "application":"hiveQueryLog"}, "enabled": true, "config":"{\"accessType\":\"metastoredb_jdbc\",\"password\":\"hive\",\"user\":\"hive\",\"jdbcDriverClassName\":\"com.mysql.jdbc.Driver\",\"jdbcUrl\":\"jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true\"}"}]'
+
+echo ""
+echo "Importing application definitions ..."
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"hdfsAuditLog"},"desc":"HDFS audit log security check application","alias":"HDFS","group":"DAM","features":["common","classification","userProfile","metadata"],"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}"}]'
+
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"hbaseSecurityLog"},"desc":"HBASE audit log security check application","alias":"HBASE","group":"DAM","features":["common","classification","userProfile","metadata"],"config":"{\n\t\"view\": {\n\t\t\"prefix\": \"hbaseResourceSensitivity\",\n\t\t\"service\": \"HbaseResourceSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"hbaseResource\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"table\",\n\t\t\"api\": {\n\t\t\t\"database\": \"hbaseResource/namespaces\",\n\t\t\t\"table\": \"hbaseResource/tables\",\n\t\t\t\"column\": \"hbaseResource/columns\"\n\t\t},\n\t\t\"mapping\": {\n\t\t\t\"database\": \"namespace\",\n\t\t\t\"table\": \"table\",\n\t\t\t\"column\": \"columnFamily\"\n\t\t}\n\t}\n}"}]'
+
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" -d '[{"prefix":"eagleApplicationDesc","tags":{"application":"hiveQueryLog"},"desc":"Hive query log security check application","alias":"HIVE","group":"DAM","features":["common","classification","userProfile","metadata"], "config":"{\n\t\"view\": {\n\t\t\"prefix\": \"hiveResourceSensitivity\",\n\t\t\"service\": \"HiveResourceSensitivityService\",\n\t\t\"keys\": [\n\t\t\t\"hiveResource\",\n\t\t\t\"sensitivityType\"\n\t\t],\n\t\t\"type\": \"table\",\n\t\t\"api\": {\n\t\t\t\"database\": \"hiveResource/databases\",\n\t\t\t\"table\": \"hiveResource/tables\",\n\t\t\t\"column\": \"hiveResource/columns\"\n\t\t},\n\t\t\"mapping\": {\n\t\t\t\"database\": \"database\",\n\t\t\t\"table\": \"table\",\n\t\t\t\"column\": \"column\"\n\t\t}\n\t}\n}"}]'
+
+echo ""
+echo "Importing feature definitions ..."
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"common"},"desc":"Provide the Policy & Alert feature.","version":"01"}]'
+
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"classification"},"desc":"Sensitivity browser of the data classification.","version":"01"}]'
+
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"userProfile"},"desc":"Machine learning of the user profile","version":"01"}]'
+
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=FeatureDescService" -d '[{"prefix":"eagleFeatureDesc","tags":{"feature":"metadata"},"desc":"Stream metadata viewer","version":"01"}]'
 
 
 ## AlertStreamService: alert streams generated from data source
@@ -44,14 +73,32 @@ echo ""
 echo "Importing AlertStreamSchemaService for HDFS... "
 curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"src"},"attrDescription":"source directory or file, such as /tmp","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"dst"},"attrDescription":"destination directory, such as /tmp","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hdfs.resolver.HDFSResourceResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"host"},"attrDescription":"hostname, such as loc
 alhost","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"timestamp"},"attrDescription":"milliseconds of the datetime","attrType":"long","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"allowed"},"attrDescription":"true, false or none","attrType":"bool","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"user"},"attrDescription":"process user","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"cmd"},"attrDescription":"file/directory operation, such as getfileinfo, open, listStatus and so on","attrType":"string","category":"","attrVal
 ueResolver":"org.apache.eagle.service.security.hdfs.resolver.HDFSCommandResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"sensitivityType"},"attrDescription":"mark such as AUDITLOG, SECURITYLOG","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hdfs.resolver.HDFSSensitivityTypeResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hdfsAuditLog","streamName":"hdfsAuditLogEventStream","attrName":"securityZone"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":""}]'
 
+
 #####################################################################
-#            Import stream metadata for HIVE
+#            Import stream metadata for HBASE
 #####################################################################
 
-## AlertDataSource: data sources bound to sites
+#### AlertStreamService: alert streams generated from data source
+echo ""
+echo "Importing AlertStreamService for HBASE... "
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream"},"desc":"alert event stream from hbase security audit log"}]'
+
+
+#### AlertExecutorService: what alert streams are consumed by alert executor
+echo ""
+echo "Importing AlertExecutorService for HBASE... "
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"dataSource":"hbaseSecurityLog","alertExecutorId":"hbaseSecurityLogAlertExecutor","streamName":"hbaseSecurityLogEventStream"},"desc":"alert executor for hbase security log event stream"}]'
+
+
+#### AlertStreamSchemaService: schema for event from alert stream
 echo ""
-echo "Importing AlertDataSourceService for HIVE... "
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"hiveQueryLog"},"enabled": "true", "config" : "{\"accessType\":\"metastoredb_jdbc\",\"password\":\"hive\",\"user\":\"hive\",\"jdbcDriverClassName\":\"com.mysql.jdbc.Driver\",\"jdbcUrl\":\"jdbc:mysql://sandbox.hortonworks.com/hive?createDatabaseIfNotExist=true\"}", "desc":"HIVE"}]'
+echo "Importing AlertStreamSchemaService for HBASE... "
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"host"},"attrDescription":"remote ip address to access hbase","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"request"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseRequestResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"status"},"attrDescription":"access status: allowed or denied","attrType":"string","category":"","attrValueResolver":""},{"pre
 fix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"user"},"attrDescription":"hbase user","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"timestamp"},"attrDescription":"milliseconds of the datetime","attrType":"long","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"scope"},"attrDescription":"the resources which users are then granted specific permissions (Read, Write, Execute, Create, Admin) against","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseMetadataResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"action"},"attrDescripti
 on":"action types, such as read, write, create, execute, and admin","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseActionResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"sensitivityType"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseSensitivityTypeResolver"}]'
+
+
+#####################################################################
+#            Import stream metadata for HIVE
+#####################################################################
 
 ## AlertStreamService: alert streams generated from data source
 echo ""
@@ -71,9 +118,7 @@ curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:a
 #####################################################################
 #            Import stream metadata for UserProfile
 #####################################################################
-echo ""
-echo "Importing AlertDataSourceService for USERPROFILE"
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site" : "sandbox", "dataSource":"userProfile"}, "enabled": "true", "config" : "{\"features\":\"getfileinfo,open,listStatus,setTimes,setPermission,rename,mkdirs,create,setReplication,contentSummary,delete,setOwner,fsck\"}", "desc":"USERPROFILE"}]'
+
 
 echo ""
 echo "Importing AlertDefinitionService for USERPROFILE"

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-assembly/src/main/bin/hbase-securitylog-schema-create.sh
----------------------------------------------------------------------
diff --git a/eagle-assembly/src/main/bin/hbase-securitylog-schema-create.sh b/eagle-assembly/src/main/bin/hbase-securitylog-schema-create.sh
deleted file mode 100755
index 7cdd6de..0000000
--- a/eagle-assembly/src/main/bin/hbase-securitylog-schema-create.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-source $(dirname $0)/eagle-env.sh
-
-echo "Importing AlertDataSourceService for HBase... "
-
-#### AlertStreamService: alert streams generated from data source
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamService" -d '[{"prefix":"alertStream","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream"},"desc":"alert event stream from hbase security audit log"}]'
-
-
-#### AlertExecutorService: what alert streams are consumed by alert executor
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertExecutorService" -d '[{"prefix":"alertExecutor","tags":{"dataSource":"hbaseSecurityLog","alertExecutorId":"hbaseSecurityLogAlertExecutor","streamName":"hbaseSecurityLogEventStream"},"desc":"alert executor for hbase security log event stream"}]'
-
-
-#### AlertStreamSchemaService: schema for event from alert stream
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertStreamSchemaService" -d '[{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"host"},"attrDescription":"remote ip address to access hbase","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"request"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseRequestResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"status"},"attrDescription":"access status: allowed or denied","attrType":"string","category":"","attrValueResolver":""},{"pre
 fix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"user"},"attrDescription":"hbase user","attrType":"string","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"timestamp"},"attrDescription":"milliseconds of the datetime","attrType":"long","category":"","attrValueResolver":""},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"scope"},"attrDescription":"the resources which users are then granted specific permissions (Read, Write, Execute, Create, Admin) against","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseMetadataResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"action"},"attrDescripti
 on":"action types, such as read, write, create, execute, and admin","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseActionResolver"},{"prefix":"alertStreamSchema","tags":{"dataSource":"hbaseSecurityLog","streamName":"hbaseSecurityLogEventStream","attrName":"sensitivityType"},"attrDescription":"","attrType":"string","category":"","attrValueResolver":"org.apache.eagle.service.security.hbase.resolver.HbaseSensitivityTypeResolver"}]'
-
-echo ""
-
-## AlertDataSource: data sources bound to sites
-echo "Importing AlertDataSourceService for hbase... "
-
-curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" -d '[{"prefix":"alertDataSource","tags":{"site":"sandbox","dataSource":"hbaseSecurityLog"},"enabled":"true","config":"{\"zkClientPort\":\"2181\", \"zkQuorum\":\"localhost\"}","desc":"HBASE"}]'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext b/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext
index 6b64e53..435b4c3 100644
--- a/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext
+++ b/eagle-core/eagle-alert/eagle-alert-process/src/test/resources/str.siddhiext
@@ -31,6 +31,9 @@ trim=org.wso2.siddhi.extension.string.TrimFunctionExtension
 upper=org.wso2.siddhi.extension.string.UpperFunctionExtension
 hex=org.wso2.siddhi.extension.string.HexFunctionExtension
 unhex=org.wso2.siddhi.extension.string.UnhexFunctionExtension
+contains=org.wso2.siddhi.extension.string.ContainsFunctionExtension
+
+# Eagle Siddhi Extension
 equalsIgnoreCase=org.apache.eagle.policy.siddhi.extension.EqualsIgnoreCaseExtension
 containsIgnoreCase=org.apache.eagle.policy.siddhi.extension.ContainsIgnoreCaseExtension
 regexpIgnoreCase=org.apache.eagle.policy.siddhi.extension.RegexpIgnoreCaseFunctionExtension
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
new file mode 100644
index 0000000..42f95f7
--- /dev/null
+++ b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationObject.java
@@ -0,0 +1,62 @@
+/*
+ * 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.alert.resolver;
+
+
+import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+
+import java.util.List;
+import java.util.Map;
+
+public class SiteApplicationObject extends TaggedLogAPIEntity {
+
+    public Boolean getEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(Boolean enabled) {
+        this.enabled = enabled;
+        valueChanged("enabled");
+    }
+
+    public List<SiteApplicationServiceEntity> getApplications() {
+        return applications;
+    }
+
+    public void setApplications(List<SiteApplicationServiceEntity> applications) {
+        this.applications = applications;
+        valueChanged("applicationList");
+    }
+
+    @Override
+    public Map<String, String> getTags() {
+        return tags;
+    }
+
+    @Override
+    public void setTags(Map<String, String> tags) {
+        this.tags = tags;
+        valueChanged("tags");
+    }
+
+    Map<String, String> tags;
+    Boolean enabled;
+    List<SiteApplicationServiceEntity> applications;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
new file mode 100644
index 0000000..903a220
--- /dev/null
+++ b/eagle-core/eagle-alert/eagle-alert-service/src/main/java/org/apache/eagle/service/alert/resolver/SiteApplicationResource.java
@@ -0,0 +1,189 @@
+/*
+ * 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.alert.resolver;
+
+import org.apache.eagle.alert.entity.ApplicationDescServiceEntity;
+import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
+import org.apache.eagle.alert.entity.SiteDescServiceEntity;
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
+import org.apache.eagle.policy.common.Constants;
+import org.apache.eagle.service.generic.GenericEntityServiceResource;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.type.TypeFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+
+@Path(SiteApplicationResource.ROOT_PATH)
+public class SiteApplicationResource {
+    private final static Logger LOG = LoggerFactory.getLogger(SiteApplicationResource.class);
+    private final static GenericEntityServiceResource resource = new GenericEntityServiceResource();
+    public final static String ROOT_PATH = "/module";
+
+    @Path("site")
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity deleteSite(@QueryParam("site") String site) {
+        String siteQuery = Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@site=\"" + site + "\"]{*}";
+        String siteApplicationQuery = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@site=\"" + site + "\"]{*}";
+        int pageSize = Integer.MAX_VALUE;
+
+        GenericServiceAPIResponseEntity response = resource.deleteByQuery(siteQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+        if(response.isSuccess()) {
+            response = resource.deleteByQuery(siteApplicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+            if(!response.isSuccess()) {
+                LOG.error(response.getException());
+            }
+        } else {
+            LOG.error(response.getException());
+        }
+        return response;
+    }
+
+    @Path("application")
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity deleteApplication(@QueryParam("application") String application) {
+        String applicationQuery = Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@application=\"" + application + "\"]{*}";
+        String siteApplicationQuery = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@application=\"" + application + "\"]{*}";
+        int pageSize = Integer.MAX_VALUE;
+
+        GenericServiceAPIResponseEntity response = resource.deleteByQuery(applicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+        if(response.isSuccess()) {
+            response = resource.deleteByQuery(siteApplicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+            if(!response.isSuccess()) {
+                LOG.error(response.getException());
+            }
+        } else {
+            LOG.error(response.getException());
+        }
+        return response;
+    }
+
+    @Path("feature")
+    @DELETE
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity deleteFeature(@QueryParam("feature") String feature) {
+        String featureQuery = Constants.FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME+ "[@feature=\"" + feature + "\"]{*}";
+        String applicationQuery = Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME + "[]{*}";
+        int pageSize = Integer.MAX_VALUE;
+
+        GenericServiceAPIResponseEntity response = resource.deleteByQuery(featureQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+        if(response.isSuccess()) {
+            response = resource.search(applicationQuery, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+            if(response.isSuccess()) {
+                List<ApplicationDescServiceEntity> entityList = response.getObj();
+                Boolean isModified = false;
+                for(ApplicationDescServiceEntity entity : entityList) {
+                    if(entity.getFeatures().contains(feature)) {
+                        List<String> features = entity.getFeatures();
+                        features.remove(feature);
+                        entity.setFeatures(features);
+                        isModified = true;
+                    }
+                }
+                if(isModified) {
+                    response = resource.updateEntities(entityList, Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME);
+                }
+            }
+        }
+        if(!response.isSuccess()) {
+            LOG.error(response.getException());
+        }
+        return response;
+    }
+
+    @Path("siteApplication")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public GenericServiceAPIResponseEntity createSiteApplications(InputStream inputStream) {
+        GenericServiceAPIResponseEntity response = new GenericServiceAPIResponseEntity<>();
+        int pageSize = Integer.MAX_VALUE;
+        try {
+            List<SiteApplicationObject> entities = (List<SiteApplicationObject>) unmarshalSiteApplicationEntities(inputStream);
+            if(entities == null) {
+                throw new IllegalArgumentException("cannot convert to SiteApplicationObject");
+            }
+            List<SiteDescServiceEntity> siteEntities = new LinkedList<>();
+            List<SiteApplicationServiceEntity> applicationEntities = new LinkedList<>();
+            Set<String> sites = new HashSet<>();
+            for(SiteApplicationObject e : entities) {
+                sites.add(e.getTags().get("site"));
+                SiteDescServiceEntity entity = new SiteDescServiceEntity();
+                entity.setEnabled(e.getEnabled());
+                entity.setTags(e.getTags());
+                siteEntities.add(entity);
+                applicationEntities.addAll(e.getApplications());
+            }
+            response = resource.updateEntities(siteEntities, Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME);
+            if(response.isSuccess()) {
+                String query = buildQueryWithAttributeList(Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME, "site", sites);
+                LOG.info("query=" + query);
+                response = resource.search(query, null, null, pageSize, null, false, false, 0L, 0, true, 0, null, false);
+                if(response.isSuccess()) {
+                    List<SiteApplicationServiceEntity> applications = response.getObj();
+                    for(SiteApplicationServiceEntity app : applications) {
+                        app.setEnabled(false);
+                    }
+                    response = resource.updateEntities(applications, Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME);
+                    if(response.isSuccess()) {
+                        response = resource.updateEntities(applicationEntities, Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME);
+                    }
+                }
+            }
+            if(!response.isSuccess()) {
+                LOG.error(response.getException());
+            }
+        } catch (Exception ex) {
+            LOG.error(ex.getMessage(), ex);
+            response.setException(ex);
+        }
+        return response;
+    }
+
+    private String buildQueryWithAttributeList(String serviceName, String attr, Set<String> sets) {
+        StringBuilder builder = new StringBuilder(serviceName + "[");
+        String attribute = "@" + attr + "=";
+        String condition = " OR ";
+        for(String s : sets) {
+            String value = String.format("\"%s\"", s);
+            builder.append(attribute + value);
+            builder.append(condition);
+        }
+        String result = builder.substring(0, builder.length()-condition.length());
+        result = result + "]{*}";
+        return result;
+    }
+
+    private List<? extends TaggedLogAPIEntity> unmarshalSiteApplicationEntities(InputStream inputStream) throws IllegalAccessException, InstantiationException, IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, SiteApplicationObject.class));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java
index 173481d..0778ffc 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertDataSourceEntity.java
@@ -30,6 +30,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonIgnoreProperties(ignoreUnknown = true)
 @TimeSeries(false)
 @Tags({"site", "dataSource"})
+@Deprecated
 public class AlertDataSourceEntity extends TaggedLogAPIEntity{
     @Column("a")
     private boolean enabled;

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java
index 0525126..507c482 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/AlertEntityRepository.java
@@ -26,8 +26,13 @@ public class AlertEntityRepository extends EntityRepository {
 		entitySet.add(AlertDefinitionAPIEntity.class);
 		entitySet.add(AlertStreamSchemaEntity.class);
 		entitySet.add(AlertStreamEntity.class);
-		entitySet.add(AlertDataSourceEntity.class);
+		//entitySet.add(AlertDataSourceEntity.class);
         entitySet.add(AlertExecutorEntity.class);
+		entitySet.add(ApplicationDescServiceEntity.class);
+		entitySet.add(FeatureDescServiceEntity.class);
+		entitySet.add(SiteDescServiceEntity.class);
+		entitySet.add(SiteApplicationServiceEntity.class);
+		this.registerEntity(GenericResourceEntity.class);
 		entitySet.add(AlertNotificationEntity.class);
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/ApplicationDescServiceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/ApplicationDescServiceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/ApplicationDescServiceEntity.java
new file mode 100644
index 0000000..76a2500
--- /dev/null
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/ApplicationDescServiceEntity.java
@@ -0,0 +1,94 @@
+/*
+ * 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.alert.entity;
+
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.apache.eagle.policy.common.Constants;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import java.util.List;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@Table("eagleApplicationDesc")
+@ColumnFamily("f")
+@Prefix("eagleApplicationDesc")
+@Service(Constants.APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@TimeSeries(false)
+@Tags({"application"})
+public class ApplicationDescServiceEntity extends TaggedLogAPIEntity {
+    @Column("a")
+    private String desc;
+    @Column("b")
+    private String alias;
+    @Column("c")
+    private String group;
+    @Column("d")
+    private List<String> features;
+    @Column("e")
+    private String config;
+
+    public String getConfig() {
+        return config;
+    }
+
+    public void setConfig(String config) {
+        this.config = config;
+        valueChanged("config");
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+        valueChanged("desc");
+    }
+
+    public String getGroup() {
+        return group;
+    }
+
+    public void setGroup(String group) {
+        this.group = group;
+        valueChanged("group");
+    }
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void setAlias(String alias) {
+        this.alias = alias;
+        valueChanged("alias");
+    }
+
+    public List<String> getFeatures() {
+        return features;
+    }
+
+    public void setFeatures(List<String> features) {
+        this.features = features;
+        valueChanged("features");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/FeatureDescServiceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/FeatureDescServiceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/FeatureDescServiceEntity.java
new file mode 100644
index 0000000..4fc6dac
--- /dev/null
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/FeatureDescServiceEntity.java
@@ -0,0 +1,59 @@
+/*
+ * 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.alert.entity;
+
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.apache.eagle.policy.common.Constants;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@Table("eagleFeatureDesc")
+@ColumnFamily("f")
+@Prefix("eagleFeatureDesc")
+@Service(Constants.FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@TimeSeries(false)
+@Tags({"feature"})
+public class FeatureDescServiceEntity extends TaggedLogAPIEntity {
+    @Column("a")
+    private String desc;
+    @Column("b")
+    private String version;
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+        valueChanged("version");
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+        valueChanged("desc");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/GenericResourceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/GenericResourceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/GenericResourceEntity.java
new file mode 100644
index 0000000..c855499
--- /dev/null
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/GenericResourceEntity.java
@@ -0,0 +1,47 @@
+/*
+ * 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.alert.entity;
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.apache.eagle.policy.common.Constants;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@Table("eagle_metadata")
+@ColumnFamily("f")
+@Prefix("generic_resource")
+@Service(Constants.GENERIC_RESOURCE_SERVICE_ENDPOINT_NAME)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@TimeSeries(false)
+@Tags({"site", "name"})
+public class GenericResourceEntity extends TaggedLogAPIEntity {
+    @Column("a")
+    private String value;
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+        valueChanged("value");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteApplicationServiceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteApplicationServiceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteApplicationServiceEntity.java
new file mode 100644
index 0000000..5eea4b3
--- /dev/null
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteApplicationServiceEntity.java
@@ -0,0 +1,60 @@
+/*
+ * 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.alert.entity;
+
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.apache.eagle.policy.common.Constants;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@Table("eagleSiteApplication")
+@ColumnFamily("f")
+@Prefix("eagleSiteApplication")
+@Service(Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@TimeSeries(false)
+@Tags({"site", "application"})
+public class SiteApplicationServiceEntity extends TaggedLogAPIEntity {
+    @Column("a")
+    private String config;
+    @Column("b")
+    private Boolean enabled;
+
+    public String getConfig() {
+        return config;
+    }
+
+    public void setConfig(String config) {
+        this.config = config;
+        valueChanged("config");
+    }
+
+    public Boolean getEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(Boolean enabled) {
+        this.enabled = enabled;
+        valueChanged("enabled");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteDescServiceEntity.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteDescServiceEntity.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteDescServiceEntity.java
new file mode 100644
index 0000000..a8245cf
--- /dev/null
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/alert/entity/SiteDescServiceEntity.java
@@ -0,0 +1,48 @@
+/*
+ * 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.alert.entity;
+
+
+import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity;
+import org.apache.eagle.log.entity.meta.*;
+import org.apache.eagle.policy.common.Constants;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@Table("eagleSiteDesc")
+@ColumnFamily("f")
+@Prefix("eagleSiteDesc")
+@Service(Constants.SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME)
+@JsonIgnoreProperties(ignoreUnknown = true)
+@TimeSeries(false)
+@Tags({"site"})
+public class SiteDescServiceEntity extends TaggedLogAPIEntity {
+    @Column("a")
+    private Boolean enabled;
+
+    public Boolean getEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(Boolean enabled) {
+        this.enabled = enabled;
+        valueChanged("enabled");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
index 256e46b..ca65669 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/common/Constants.java
@@ -26,6 +26,13 @@ public class Constants {
 	public final static String ALERT_NOTIFICATION_SERVICE_ENDPOINT_NAME = "AlertNotificationService";
 	public static final String ALERT_EMAIL_ORIGIN_PROPERTY = "alertEmailOrigin";
 	public static final String ALERT_TIMESTAMP_PROPERTY = "alertTimestamp";
+
+	public static final String SITE_APPLICATION_SERVICE_ENDPOINT_NAME = "SiteApplicationService";
+	public static final String SITE_DESCRIPTION_SERVICE_ENDPOINT_NAME = "SiteDescService";
+	public static final String APPLICATION_DESCRIPTION_SERVICE_ENDPOINT_NAME = "ApplicationDescService";
+	public static final String FEATURE_DESCRIPTION_SERVICE_ENDPOINT_NAME = "FeatureDescService";
+
+	public static final String GENERIC_RESOURCE_SERVICE_ENDPOINT_NAME = "GenericResourceService";
 	
 	public final static String AGGREGATE_DEFINITION_SERVICE_ENDPOINT_NAME = "AggregateDefinitionService";
 

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDataSourceDAO.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDataSourceDAO.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDataSourceDAO.java
deleted file mode 100644
index 650defc..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDataSourceDAO.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.policy.dao;
-
-import org.apache.eagle.alert.entity.AlertDataSourceEntity;
-
-import java.util.List;
-
-public interface AlertDataSourceDAO {
-    List<AlertDataSourceEntity> findAlertDataSourceBySite(String site) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDataSourceDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDataSourceDAOImpl.java b/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDataSourceDAOImpl.java
deleted file mode 100644
index ca037a3..0000000
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDataSourceDAOImpl.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.policy.dao;
-
-import org.apache.eagle.policy.common.Constants;
-import org.apache.eagle.alert.entity.AlertDataSourceEntity;
-import org.apache.eagle.log.entity.GenericServiceAPIResponseEntity;
-import org.apache.eagle.service.client.EagleServiceConnector;
-import org.apache.eagle.service.client.IEagleServiceClient;
-import org.apache.eagle.service.client.impl.EagleServiceClientImpl;
-import org.apache.commons.lang.time.DateUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class AlertDataSourceDAOImpl implements AlertDataSourceDAO{
-    private final Logger LOG = LoggerFactory.getLogger(AlertDataSourceDAOImpl.class);
-    private final EagleServiceConnector connector;
-
-    public AlertDataSourceDAOImpl(EagleServiceConnector connector){
-        this.connector = connector;
-    }
-
-    @Override
-    public List<AlertDataSourceEntity> findAlertDataSourceBySite(String site) throws Exception{
-        try {
-            IEagleServiceClient client = new EagleServiceClientImpl(connector);
-            String query = Constants.ALERT_STREAM_SERVICE_ENDPOINT_NAME + "[@site=\"" + site + "\"]{*}";
-            GenericServiceAPIResponseEntity<AlertDataSourceEntity> response =  client.search()
-                    .startTime(0)
-                    .endTime(10 * DateUtils.MILLIS_PER_DAY)
-                    .pageSize(Integer.MAX_VALUE)
-                    .query(query)
-                    .send();
-            client.close();
-            if (response.getException() != null) {
-                throw new Exception("Got an exception when query eagle service: " + response.getException());
-            }
-            return response.getObj();
-        }
-        catch (Exception ex) {
-            LOG.error("Got an exception when query stream metadata service ", ex);
-            throw new IllegalStateException(ex);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext b/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext
index 8c1672b..479cdb0 100644
--- a/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext
+++ b/eagle-core/eagle-policy/eagle-policy-base/src/main/resources/str.siddhiext
@@ -31,6 +31,10 @@ trim=org.wso2.siddhi.extension.string.TrimFunctionExtension
 upper=org.wso2.siddhi.extension.string.UpperFunctionExtension
 hex=org.wso2.siddhi.extension.string.HexFunctionExtension
 unhex=org.wso2.siddhi.extension.string.UnhexFunctionExtension
+contains=org.wso2.siddhi.extension.string.ContainsFunctionExtension
+
+# Eagle Siddhi Extension
 equalsIgnoreCase=org.apache.eagle.policy.siddhi.extension.EqualsIgnoreCaseExtension
 containsIgnoreCase=org.apache.eagle.policy.siddhi.extension.ContainsIgnoreCaseExtension
 regexpIgnoreCase=org.apache.eagle.policy.siddhi.extension.RegexpIgnoreCaseFunctionExtension
+

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java
index 43302c8..fb52352 100644
--- a/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java
+++ b/eagle-core/eagle-query/eagle-service-base/src/main/java/org/apache/eagle/service/generic/GenericEntityServiceResource.java
@@ -73,6 +73,47 @@ public class GenericEntityServiceResource {
         return objectMapper.readValue(inputStream, TypeFactory.defaultInstance().constructCollectionType(LinkedList.class, String.class));
     }
 
+
+    public GenericServiceAPIResponseEntity updateDatabase(Statement<ModifyResult<String>> statement) {
+        GenericServiceAPIResponseEntity<String> response = new GenericServiceAPIResponseEntity<>();
+        Map<String,Object> meta = new HashMap<>();
+        StopWatch stopWatch = new StopWatch();
+
+        try {
+            stopWatch.start();
+            DataStorage dataStorage = DataStorageManager.getDataStorageByEagleConfig();
+            if(dataStorage == null){
+                LOG.error("Data storage is null");
+                throw new IllegalDataStorageException("Data storage is null");
+            }
+            ModifyResult<String> result = statement.execute(dataStorage);
+            if(result.isSuccess()) {
+                List<String> keys =result.getIdentifiers();
+                if(keys != null) {
+                    response.setObj(keys, String.class);
+                    meta.put(TOTAL_RESULTS, keys.size());
+                } else {
+                    meta.put(TOTAL_RESULTS, 0);
+                }
+                meta.put(ELAPSEDMS,stopWatch.getTime());
+                response.setMeta(meta);
+                response.setSuccess(true);
+            }
+        } catch (Exception e) {
+            LOG.error(e.getMessage(), e);
+            response.setException(e);
+        }finally {
+            stopWatch.stop();
+        }
+        return response;
+    }
+
+    public GenericServiceAPIResponseEntity updateEntities(List<? extends TaggedLogAPIEntity> entities, String serviceName) {
+        CreateStatement createStatement = new CreateStatement(entities, serviceName);
+        GenericServiceAPIResponseEntity<String> response = updateDatabase(createStatement);
+        return response;
+    }
+
     @POST
     @Consumes(MediaType.APPLICATION_JSON)
     @Produces(MediaType.APPLICATION_JSON)

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh
----------------------------------------------------------------------
diff --git a/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh b/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh
index 8405c19..17923c7 100755
--- a/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh
+++ b/eagle-hadoop-metric/src/main/resources/hadoop-metric-init.sh
@@ -25,18 +25,33 @@ source $(dirname $0)/eagle-env.sh
 echo "Importing AlertDataSourceService for persist... "
 
 curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
- "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=AlertDataSourceService" \
+ "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=SiteApplicationService" \
   -d '
   [
      {
-        "prefix":"alertDataSource",
         "tags":{
            "site":"sandbox",
-           "dataSource":"hadoopJmxMetricDataSource"
+           "application":"hadoopJmxMetricDataSource"
         },
         "enabled": true,
-        "config":"",
-        "desc":"hadoop"
+        "config":"{}"
+     }
+  ]
+  '
+
+curl -u ${EAGLE_SERVICE_USER}:${EAGLE_SERVICE_PASSWD} -X POST -H 'Content-Type:application/json' \
+ "http://${EAGLE_SERVICE_HOST}:${EAGLE_SERVICE_PORT}/eagle-service/rest/entities?serviceName=ApplicationDescService" \
+  -d '
+  [
+     {
+        "tags":{
+           "application":"hadoopJmxMetricDataSource"
+        },
+        "desc":"hadoop jmx metric monitoring",
+        "alias":"JmxMetricMonitor",
+        "group":"METRIC",
+        "config":"{}",
+        "features":["common","metadata"]
      }
   ]
   '

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/dao/HbaseMetadataAccessConfigDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/dao/HbaseMetadataAccessConfigDAOImpl.java b/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/dao/HbaseMetadataAccessConfigDAOImpl.java
index 1378032..152facb 100644
--- a/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/dao/HbaseMetadataAccessConfigDAOImpl.java
+++ b/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/dao/HbaseMetadataAccessConfigDAOImpl.java
@@ -20,8 +20,9 @@ package org.apache.eagle.service.security.hbase.dao;
 
 
 import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.eagle.alert.entity.AlertDataSourceEntity;
+import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
 import org.apache.eagle.log.entity.ListQueryAPIResponseEntity;
+import org.apache.eagle.policy.common.Constants;
 import org.apache.eagle.security.util.BadMetadataAccessConfigException;
 import org.apache.eagle.service.generic.ListQueryResource;
 import org.slf4j.Logger;
@@ -49,9 +50,9 @@ public class HbaseMetadataAccessConfigDAOImpl {
         ListQueryResource resource = new ListQueryResource();
         /* parameters are: query, startTime, endTime, pageSzie, startRowkey, treeAgg, timeSeries, intervalmin, top, filterIfMissing,
         * parallel, metricName*/
-        String queryFormat = "AlertDataSourceService[@dataSource=\"hbaseSecurityLog\" AND @site=\"%s\"]{*}";
+        String queryFormat = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME + "[@application=\"hbaseSecurityLog\" AND @site=\"%s\"]{*}";
         ListQueryAPIResponseEntity ret = resource.listQuery(String.format(queryFormat, site), null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false, 0, null);
-        List<AlertDataSourceEntity> list = (List<AlertDataSourceEntity>) ret.getObj();
+        List<SiteApplicationServiceEntity> list = (List<SiteApplicationServiceEntity>) ret.getObj();
         if(list == null || list.size() ==0)
             throw new BadMetadataAccessConfigException("config is empty for site " + site);
         return convert(list.get(0).getConfig());

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf b/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
index 2f8ea8b..697b4f6 100644
--- a/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
+++ b/eagle-security/eagle-security-hdfs-auditlog/src/main/resources/application.conf
@@ -26,12 +26,12 @@
   },
   "dataSourceConfig": {
     "topic" : "sandbox_hdfs_audit_log",
-    "zkConnection" : "localhost:2181",
+    "zkConnection" : "sandbox.hortonworks.com:2181",
     "zkConnectionTimeoutMS" : 15000,
     "consumerGroupId" : "EagleConsumer",
     "fetchSize" : 1048586,
     "deserializerClass" : "org.apache.eagle.security.auditlog.HdfsAuditLogKafkaDeserializer",
-    "transactionZKServers" : "localhost",
+    "transactionZKServers" : "sandbox.hortonworks.com",
     "transactionZKPort" : 2181,
     "transactionZKRoot" : "/consumers",
     "transactionStateUpdateMS" : 2000

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/HDFSResourceUtils.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/HDFSResourceUtils.java b/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/HDFSResourceUtils.java
index 7d57ef7..bece538 100644
--- a/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/HDFSResourceUtils.java
+++ b/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/HDFSResourceUtils.java
@@ -18,9 +18,10 @@ package org.apache.eagle.service.security.hdfs;
 
 import java.util.List;
 
+import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
+import org.apache.eagle.policy.common.Constants;
 import org.apache.eagle.service.generic.ListQueryResource;
 
-import org.apache.eagle.alert.entity.AlertDataSourceEntity;
 import org.apache.eagle.log.entity.ListQueryAPIResponseEntity;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
@@ -34,9 +35,9 @@ public class HDFSResourceUtils {
 	public static HDFSResourceAccessConfig  getConfig(String siteId ) throws Exception
 	{
 		ListQueryResource resource = new ListQueryResource();
-		String queryFormat = "AlertDataSourceService[@dataSource=\""+HDFSResourceConstants.HDFS_DATA_SOURCE+"\" AND @site=\"%s\"]{*}";
+		String queryFormat = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME+"[@application=\""+HDFSResourceConstants.HDFS_DATA_SOURCE+"\" AND @site=\"%s\"]{*}";
 		ListQueryAPIResponseEntity ret = resource.listQuery(String.format(queryFormat, siteId), null, null,Integer.MAX_VALUE, null, false, false, 0L, 0, false, 0, null);
-		List<AlertDataSourceEntity> list = (List<AlertDataSourceEntity>) ret.getObj();
+		List<SiteApplicationServiceEntity> list = (List<SiteApplicationServiceEntity>) ret.getObj();
 		if (list == null || list.size() == 0)
 			throw new Exception("Config is empty for site " + siteId +".");
 	    

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/HDFSCommandResolver.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/HDFSCommandResolver.java b/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/HDFSCommandResolver.java
index 23694e5..b2a2671 100644
--- a/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/HDFSCommandResolver.java
+++ b/eagle-security/eagle-security-hdfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/HDFSCommandResolver.java
@@ -37,6 +37,8 @@ public class HDFSCommandResolver implements AttributeResolvable<GenericAttribute
             "mkdirs", "listStatus", "setReplication", "setOwner", "setPermission", "setTimes", "setXAttr", "removeXAttr", "getXAttrs",
             "contentSummary", "createEncryptionZone", "checkAccess"};
 
+    //private final static String [] cmdStrs = {"appendToFile","cat","checksum","chgrp","chmod","chown","copyFromLocal","copyToLocal","count","cp","createSnapshot","deleteSnapshot","df","du","dus","expunge","find","get","getfacl","getfattr","getmerge","help","ls","lsr","mkdir","moveFromLocal","moveToLocal","mv","put","renameSnapshot","rm","rmdir","rmr","setfacl","setfattr","setrep","stat","tail","test","text","touchz","truncate","usage"};
+
     private final static String HDFS_CMD_RESOLVE_FORMAT_HINT = String.format("hdfs command must be in {%s}", StringUtils.join(cmdStrs, ","));
 
     private final static List<String> commands = Arrays.asList(cmdStrs);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/d37643b0/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveMetadataAccessConfigDAOImpl.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveMetadataAccessConfigDAOImpl.java b/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveMetadataAccessConfigDAOImpl.java
index 8a6f965..d0c18ed 100644
--- a/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveMetadataAccessConfigDAOImpl.java
+++ b/eagle-security/eagle-security-hive-web/src/main/java/org/apache/eagle/service/security/hive/dao/HiveMetadataAccessConfigDAOImpl.java
@@ -16,8 +16,9 @@
  */
 package org.apache.eagle.service.security.hive.dao;
 
-import org.apache.eagle.alert.entity.AlertDataSourceEntity;
+import org.apache.eagle.alert.entity.SiteApplicationServiceEntity;
 import org.apache.eagle.log.entity.ListQueryAPIResponseEntity;
+import org.apache.eagle.policy.common.Constants;
 import org.apache.eagle.service.generic.ListQueryResource;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.slf4j.Logger;
@@ -36,11 +37,11 @@ public class HiveMetadataAccessConfigDAOImpl implements HiveMetadataAccessConfig
         ListQueryResource resource = new ListQueryResource();
         /* parameters are: query, startTime, endTime, pageSzie, startRowkey, treeAgg, timeSeries, intervalmin, top, filterIfMissing,
         * parallel, metricName*/
-        ListQueryAPIResponseEntity ret = resource.listQuery("AlertDataSourceService[@dataSource=\"hiveQueryLog\"]{*}", null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false,
+        ListQueryAPIResponseEntity ret = resource.listQuery(Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME+"[@application=\"hiveQueryLog\"]{*}", null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false,
                 0, null);
-        List<AlertDataSourceEntity> list = (List<AlertDataSourceEntity>) ret.getObj();
-        Map<String, HiveMetadataAccessConfig> siteHiveConfigs = new HashMap<String, HiveMetadataAccessConfig>();
-        for(AlertDataSourceEntity hiveDataSource : list){
+        List<SiteApplicationServiceEntity> list = (List<SiteApplicationServiceEntity>) ret.getObj();
+        Map<String, HiveMetadataAccessConfig> siteHiveConfigs = new HashMap<>();
+        for(SiteApplicationServiceEntity hiveDataSource : list){
             siteHiveConfigs.put(hiveDataSource.getTags().get("site"), convert(hiveDataSource.getConfig()));
         }
         return siteHiveConfigs;
@@ -48,7 +49,7 @@ public class HiveMetadataAccessConfigDAOImpl implements HiveMetadataAccessConfig
 
     private HiveMetadataAccessConfig convert(String config){
         ObjectMapper mapper = new ObjectMapper();
-        HiveMetadataAccessConfig c = null;
+        HiveMetadataAccessConfig c;
         try {
             c = mapper.readValue(config, HiveMetadataAccessConfig.class);
         }catch(Exception ex){
@@ -64,12 +65,12 @@ public class HiveMetadataAccessConfigDAOImpl implements HiveMetadataAccessConfig
         ListQueryResource resource = new ListQueryResource();
         /* parameters are: query, startTime, endTime, pageSzie, startRowkey, treeAgg, timeSeries, intervalmin, top, filterIfMissing,
         * parallel, metricName*/
-        String queryFormat = "AlertDataSourceService[@dataSource=\"hiveQueryLog\" AND @site=\"%s\"]{*}";
+        String queryFormat = Constants.SITE_APPLICATION_SERVICE_ENDPOINT_NAME+"[@application=\"hiveQueryLog\" AND @site=\"%s\"]{*}";
         ListQueryAPIResponseEntity ret = resource.listQuery(String.format(queryFormat, site), null, null, Integer.MAX_VALUE, null, false, false, 0L, 0, false,
                 0, null);
-        List<AlertDataSourceEntity> list = (List<AlertDataSourceEntity>) ret.getObj();
+        List<SiteApplicationServiceEntity> list = (List<SiteApplicationServiceEntity>) ret.getObj();
         if(list == null || list.size() ==0)
             throw new BadHiveMetadataAccessConfigException("config is empty for site " + site);
         return convert(list.get(0).getConfig());
     }
-}
+}
\ No newline at end of file



Mime
View raw message