Repository: incubator-eagle Updated Branches: refs/heads/develop 32d96b295 -> 53370c2e7
Hbase monitoring metadata browse API in new app framework Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/53370c2e Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/53370c2e Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/53370c2e Branch: refs/heads/develop Commit: 53370c2e79fc418edf6c7697aa6fc3ac7fce3747 Parents: 32d96b2 Author: yonzhang <yonzhang2...@gmail.com> Authored: Tue Aug 9 10:14:45 2016 -0700 Committer: yonzhang <yonzhang2...@gmail.com> Committed: Tue Aug 9 10:14:45 2016 -0700 ---------------------------------------------------------------------- .../src/main/resources/core-site.xml | 4 +- .../app/ApplicationProviderDescConfigTest.java | 3 + .../example/ExampleApplicationProviderTest.java | 2 +- .../resolver/MetadataAccessConfigRepo.java | 2 +- .../service/JDBCSecurityMetadataDAO.java | 124 +++++++++++++++++++ .../security/service/MetadataDaoFactory.java | 23 +--- .../src/main/resources/META-INF/metadata.xml | 22 +++- .../src/main/ddl.script | 21 ++++ .../hbase/HbaseMetadataBrowseWebResource.java | 81 +++++++++--- .../hbase/SensitivityMetadataResource.java | 5 +- eagle-server/pom.xml | 44 ++++--- .../src/main/resources/application.conf | 3 +- 12 files changed, 266 insertions(+), 68 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-core/eagle-alert-parent/eagle-alert-service/src/main/resources/core-site.xml ---------------------------------------------------------------------- diff --git a/eagle-core/eagle-alert-parent/eagle-alert-service/src/main/resources/core-site.xml b/eagle-core/eagle-alert-parent/eagle-alert-service/src/main/resources/core-site.xml index 06d24df..2e0c803 100644 --- a/eagle-core/eagle-alert-parent/eagle-alert-service/src/main/resources/core-site.xml +++ b/eagle-core/eagle-alert-parent/eagle-alert-service/src/main/resources/core-site.xml @@ -19,6 +19,6 @@ <configuration> <property> <name>fs.defaultFS</name> - <value>hdfs://NN URL:8020</value> + <value>hdfs://server.eagle.apache.org:8020</value> </property> -</configuration> \ No newline at end of file +</configuration> http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-core/eagle-app/eagle-app-base/src/test/java/org/apache/eagle/app/ApplicationProviderDescConfigTest.java ---------------------------------------------------------------------- diff --git a/eagle-core/eagle-app/eagle-app-base/src/test/java/org/apache/eagle/app/ApplicationProviderDescConfigTest.java b/eagle-core/eagle-app/eagle-app-base/src/test/java/org/apache/eagle/app/ApplicationProviderDescConfigTest.java index cd28d86..30c105c 100644 --- a/eagle-core/eagle-app/eagle-app-base/src/test/java/org/apache/eagle/app/ApplicationProviderDescConfigTest.java +++ b/eagle-core/eagle-app/eagle-app-base/src/test/java/org/apache/eagle/app/ApplicationProviderDescConfigTest.java @@ -1,7 +1,9 @@ package org.apache.eagle.app; import org.apache.eagle.app.config.ApplicationProviderDescConfig; +import org.apache.eagle.app.spi.AbstractApplicationProvider; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Test; import javax.xml.bind.JAXBContext; @@ -26,6 +28,7 @@ import java.io.InputStream; */ public class ApplicationProviderDescConfigTest { @Test + @Ignore public void testApplicationDescWrapperConfigLoadFromXML(){ ApplicationProviderDescConfig config = ApplicationProviderDescConfig.loadFromXML(null, "TestApplicationMetadata.xml"); Assert.assertNotNull(config); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java ---------------------------------------------------------------------- diff --git a/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java b/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java index 88dd02d..eaf9f46 100644 --- a/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java +++ b/eagle-examples/eagle-app-example/src/test/java/org/apache/eagle/app/example/ExampleApplicationProviderTest.java @@ -44,7 +44,7 @@ public class ExampleApplicationProviderTest { public void testApplicationProviderLoading(){ Collection<ApplicationDesc> applicationDescs = applicationResource.getApplicationDescs().getData(); Assert.assertNotNull(applicationDescs); - Assert.assertEquals(2,applicationDescs.size()); + Assert.assertEquals(1,applicationDescs.size()); } /** http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java ---------------------------------------------------------------------- diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java index 1292fb8..a595902 100644 --- a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java +++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/resolver/MetadataAccessConfigRepo.java @@ -62,4 +62,4 @@ public class MetadataAccessConfigRepo { } return config; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/JDBCSecurityMetadataDAO.java ---------------------------------------------------------------------- diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/JDBCSecurityMetadataDAO.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/JDBCSecurityMetadataDAO.java new file mode 100644 index 0000000..bf05d66 --- /dev/null +++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/JDBCSecurityMetadataDAO.java @@ -0,0 +1,124 @@ +/* + * + * * 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 + * * <p/> + * * http://www.apache.org/licenses/LICENSE-2.0 + * * <p/> + * * 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.security.service; + +import com.typesafe.config.Config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.sql.*; +import java.util.ArrayList; +import java.util.Collection; + +/** + * Since 8/8/16. + */ +public class JDBCSecurityMetadataDAO implements ISecurityMetadataDAO { + private static final Logger LOG = LoggerFactory.getLogger(JDBCSecurityMetadataDAO.class); + + private Config config; + /** + * composite primary key: site and hbase_resource + */ + private final String QUERY_ALL_STATEMENT = "SELECT site, hbase_resource, sensitivity_type FROM hbase_sensitivity_entity"; + private final String INSERT_STATEMENT = "INSERT INTO hbase_sensitivity_entity (site, hbase_resource, sensitivity_type) VALUES (?, ?, ?)"; + + // get connection url from config + public JDBCSecurityMetadataDAO(Config config){ + this.config = config; + } + + @Override + public Collection<HBaseSensitivityEntity> listHBaseSensitivies() { + Connection connection = null; + PreparedStatement statement = null; + Collection<HBaseSensitivityEntity> ret = new ArrayList<>(); + ResultSet rs = null; + try { + connection = getJdbcConnection(); + statement = connection.prepareStatement(QUERY_ALL_STATEMENT); + rs = statement.executeQuery(); + while (rs.next()) { + HBaseSensitivityEntity entity = new HBaseSensitivityEntity(); + entity.setSite(rs.getString(1)); + entity.setHbaseResource(rs.getString(2)); + entity.setSensitivityType(rs.getString(3)); + ret.add(entity); + } + }catch(Exception e) { + LOG.error("error in querying hbase_sensitivity_entity table", e); + }finally{ + try{ + if(rs != null) + rs.close(); + if(statement != null) + statement.close(); + if(connection != null) + connection.close(); + }catch(Exception ex){ + LOG.error("error in closing database resources", ex); + } + } + return ret; + } + + @Override + public OpResult addHBaseSensitivity(Collection<HBaseSensitivityEntity> h) { + Connection connection = null; + PreparedStatement statement = null; + try{ + connection = getJdbcConnection(); + statement = connection.prepareStatement(INSERT_STATEMENT); + connection.setAutoCommit(false); + for(HBaseSensitivityEntity entity : h){ + statement.setString(1, entity.getSite()); + statement.setString(2, entity.getHbaseResource()); + statement.setString(3, entity.getSensitivityType()); + statement.addBatch(); + } + statement.executeBatch(); + connection.commit(); + }catch(Exception ex){ + LOG.error("error in querying hbase_sensitivity_entity table", ex); + }finally { + try { + if (statement != null) + statement.close(); + if(connection != null) + connection.close(); + }catch(Exception ex){ + LOG.error("error in closing database resources", ex); + } + } + return null; + } + + private Connection getJdbcConnection() throws Exception { + Connection connection = null; + String conn = config.getString("connection"); + try { + connection = DriverManager.getConnection(conn, "root", ""); + } catch (Exception e) { + LOG.error("error get connection for {}", conn, e); + throw e; + } + return connection; + } +} http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/MetadataDaoFactory.java ---------------------------------------------------------------------- diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/MetadataDaoFactory.java b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/MetadataDaoFactory.java index 65e86f0..90cecd7 100644 --- a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/MetadataDaoFactory.java +++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/service/MetadataDaoFactory.java @@ -20,8 +20,6 @@ import com.typesafe.config.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.lang.reflect.Constructor; - /** * @since Apr 12, 2016 * @@ -29,25 +27,14 @@ import java.lang.reflect.Constructor; public class MetadataDaoFactory { private static final Logger LOG = LoggerFactory.getLogger(MetadataDaoFactory.class); - public static ISecurityMetadataDAO getMetadataDAO(String storeCls) { + public static ISecurityMetadataDAO getMetadataDAO(Config eagleServerConfig) { + String storeCls = eagleServerConfig.getString("metadata.store"); + ISecurityMetadataDAO dao = null; - if (storeCls == null) { - LOG.warn("metadata store is not configured, use in-memory store !!!"); + if (!storeCls.equalsIgnoreCase("org.apache.eagle.metadata.service.memory.MemoryMetadataStore")) { dao = new InMemMetadataDaoImpl(); } else { - Class<?> clz; - try { - clz = Thread.currentThread().getContextClassLoader().loadClass(storeCls); - if (ISecurityMetadataDAO.class.isAssignableFrom(clz)) { - Constructor<?> cotr = clz.getConstructor(); - dao = (ISecurityMetadataDAO) cotr.newInstance(); - } else { - throw new Exception("metadataDao configuration need to be implementation of IMetadataDao! "); - } - } catch (Exception e) { - LOG.error("error when initialize the dao, fall back to in memory mode!", e); - dao = new InMemMetadataDaoImpl(); - } + dao = new JDBCSecurityMetadataDAO(eagleServerConfig); } return dao; } http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-security/eagle-security-hbase-auditlog/src/main/resources/META-INF/metadata.xml ---------------------------------------------------------------------- diff --git a/eagle-security/eagle-security-hbase-auditlog/src/main/resources/META-INF/metadata.xml b/eagle-security/eagle-security-hbase-auditlog/src/main/resources/META-INF/metadata.xml index 665b5d7..692e3f9 100644 --- a/eagle-security/eagle-security-hbase-auditlog/src/main/resources/META-INF/metadata.xml +++ b/eagle-security/eagle-security-hbase-auditlog/src/main/resources/META-INF/metadata.xml @@ -34,7 +34,7 @@ <property> <name>dataSourceConfig.zkConnection</name> <displayName>dataSourceConfig.zkConnection</displayName> - <value>localhost</value> + <value>server.eagle.apache.org</value> <description>zk connection</description> </property> <property> @@ -52,7 +52,7 @@ <property> <name>dataSourceConfig.transactionZKServers</name> <displayName>dataSourceConfig.transactionZKServers</displayName> - <value>localhost</value> + <value>server.eagle.apache.org</value> <description>zookeeper server for offset transaction</description> </property> <property> @@ -181,6 +181,24 @@ <value>org.apache.eagle.security.service.InMemMetadataDaoImpl</value> <description>implementation class for metadata store</description> </property> + <property> + <name>hbase.zookeeper.quorum</name> + <displayName>hbase.zookeeper.quorum</displayName> + <value>server.eagle.apache.org</value> + <description>hbase zookeeper endpoint host</description> + </property> + <property> + <name>hbase.zookeeper.property.clientPort</name> + <displayName>hbase.zookeeper.property.clientPort</displayName> + <value>2181</value> + <description>hbase zookeeper endpoint port</description> + </property> + <property> + <name>zookeeper.znode.parent</name> + <displayName>zookeeper.znode.parent</displayName> + <value>/hbase-unsecure</value> + <description>zookeeper znode parent for hbase</description> + </property> </configuration> <streams> <stream> http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-security/eagle-security-hbase-web/src/main/ddl.script ---------------------------------------------------------------------- diff --git a/eagle-security/eagle-security-hbase-web/src/main/ddl.script b/eagle-security/eagle-security-hbase-web/src/main/ddl.script new file mode 100644 index 0000000..a4914e9 --- /dev/null +++ b/eagle-security/eagle-security-hbase-web/src/main/ddl.script @@ -0,0 +1,21 @@ +# 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. + +GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' with grant option; +flush privileges; + +create database eagle; +use eagle; +create table hbase_sensitivity_entity (site varchar(20), hbase_resource varchar(100), sensitivity_type varchar(20), primary key (site, hbase_resource)); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/HbaseMetadataBrowseWebResource.java ---------------------------------------------------------------------- diff --git a/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/HbaseMetadataBrowseWebResource.java b/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/HbaseMetadataBrowseWebResource.java index 2daaa17..3fa85d9 100644 --- a/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/HbaseMetadataBrowseWebResource.java +++ b/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/HbaseMetadataBrowseWebResource.java @@ -1,24 +1,32 @@ /* - * 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 + * * 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 + * * <p/> + * * http://www.apache.org/licenses/LICENSE-2.0 + * * <p/> + * * 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. * - * 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.hbase; +import com.google.inject.Inject; import com.typesafe.config.Config; +import org.apache.eagle.metadata.model.ApplicationEntity; +import org.apache.eagle.metadata.service.ApplicationEntityService; import org.apache.eagle.security.entity.HbaseResourceEntity; import org.apache.eagle.security.resolver.MetadataAccessConfigRepo; +import org.apache.eagle.security.service.HBaseSensitivityEntity; +import org.apache.eagle.security.service.ISecurityMetadataDAO; +import org.apache.eagle.security.service.MetadataDaoFactory; import org.apache.eagle.service.common.EagleExceptionWrapper; import org.apache.eagle.service.security.hbase.dao.HbaseMetadataDAOImpl; import org.apache.hadoop.conf.Configuration; @@ -33,10 +41,44 @@ import java.util.regex.Pattern; @Path("/hbaseResource") public class HbaseMetadataBrowseWebResource { private static Logger LOG = LoggerFactory.getLogger(HbaseMetadataBrowseWebResource.class); - private HbaseSensitivityResourceService dao = new HbaseSensitivityResourceService(); - private Map<String, Map<String, String>> maps = dao.getAllHbaseSensitivityMap(); private MetadataAccessConfigRepo repo = new MetadataAccessConfigRepo(); - final public static String HBASE_APPLICATION = "hbaseSecurityLog"; + final public static String HBASE_APPLICATION = "HBaseAuditLogApplication"; + + private ApplicationEntityService entityService; + private ISecurityMetadataDAO dao; + + @Inject + public HbaseMetadataBrowseWebResource(ApplicationEntityService entityService, Config eagleServerConfig){ + this.entityService = entityService; + dao = MetadataDaoFactory.getMetadataDAO(eagleServerConfig); + + } + + private Map<String, Map<String, String>> getAllSensitivities(){ + Map<String, Map<String, String>> all = new HashMap<>(); + Collection<HBaseSensitivityEntity> entities = dao.listHBaseSensitivies(); + for(HBaseSensitivityEntity entity : entities){ + if(!all.containsKey(entity.getSite())){ + all.put(entity.getSite(), new HashMap<>()); + } + all.get(entity.getSite()).put(entity.getHbaseResource(), entity.getSensitivityType()); + } + return all; + } + + private Map<String, Object> getAppConfig(String site, String appType){ + ApplicationEntity entity = entityService.getBySiteIdAndAppType(site, appType); + return entity.getConfiguration(); + } + + + private Configuration convert(Map<String, Object> originalConfig) throws Exception { + Configuration config = new Configuration(); + for (Map.Entry<String, Object> entry : originalConfig.entrySet()) { + config.set(entry.getKey().toString(), entry.getValue().toString()); + } + return config; + } @Path("/namespaces") @GET @@ -47,8 +89,8 @@ public class HbaseMetadataBrowseWebResource { List<HbaseResourceEntity> values = new ArrayList<>(); HbaseMetadataBrowseWebResponse response = new HbaseMetadataBrowseWebResponse(); try { - Config config = repo.getConfig(HBASE_APPLICATION, site); - Configuration conf = repo.convert(config); + Map<String, Object> config = getAppConfig(site, HBASE_APPLICATION); + Configuration conf = convert(config); HbaseMetadataDAOImpl dao = new HbaseMetadataDAOImpl(conf); namespaces = dao.getNamespaces(); @@ -76,8 +118,8 @@ public class HbaseMetadataBrowseWebResource { List<String> tables = null; List<HbaseResourceEntity> values = new ArrayList<>(); try { - Config config = repo.getConfig(HBASE_APPLICATION, site); - Configuration conf = repo.convert(config); + Map<String, Object> config = getAppConfig(site, HBASE_APPLICATION); + Configuration conf = convert(config); HbaseMetadataDAOImpl dao = new HbaseMetadataDAOImpl(conf); tables = dao.getTables(namespace); }catch(Exception ex){ @@ -132,6 +174,7 @@ public class HbaseMetadataBrowseWebResource { String checkSensitivity(String site, String resource, Set<String> childSensitiveTypes) { + Map<String, Map<String, String>> maps = getAllSensitivities(); String sensitiveType = null; if (maps != null && maps.get(site) != null) { Map<String, String> map = maps.get(site); http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/SensitivityMetadataResource.java ---------------------------------------------------------------------- diff --git a/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/SensitivityMetadataResource.java b/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/SensitivityMetadataResource.java index 7b85c69..e5d3b31 100644 --- a/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/SensitivityMetadataResource.java +++ b/eagle-security/eagle-security-hbase-web/src/main/java/org/apache/eagle/service/security/hbase/SensitivityMetadataResource.java @@ -38,14 +38,11 @@ import java.util.Iterator; @Singleton public class SensitivityMetadataResource { private ApplicationEntityService entityService; - private Config config; private ISecurityMetadataDAO dao; @Inject public SensitivityMetadataResource(ApplicationEntityService entityService, Config eagleServerConfig){ this.entityService = entityService; - this.config = eagleServerConfig; - String metadataStoreCls = eagleServerConfig.getString("metadata.store"); - dao = MetadataDaoFactory.getMetadataDAO(metadataStoreCls); + dao = MetadataDaoFactory.getMetadataDAO(eagleServerConfig); } @Path("/hbase") http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-server/pom.xml ---------------------------------------------------------------------- diff --git a/eagle-server/pom.xml b/eagle-server/pom.xml index e8264a2..ad3a701 100644 --- a/eagle-server/pom.xml +++ b/eagle-server/pom.xml @@ -127,26 +127,30 @@ <artifactId>eagle-common</artifactId> <version>${project.version}</version> </dependency> - <!--<dependency>--> - <!--<groupId>org.apache.eagle</groupId>--> - <!--<artifactId>eagle-app-example</artifactId>--> - <!--<version>${project.version}</version>--> - <!--</dependency>--> - <!--<dependency>--> - <!--<groupId>org.apache.eagle</groupId>--> - <!--<artifactId>eagle-jpm-app</artifactId>--> - <!--<version>${project.version}</version>--> - <!--</dependency>--> - <!--<dependency>--> - <!--<groupId>org.apache.eagle</groupId>--> - <!--<artifactId>eagle-security-hbase-auditlog</artifactId>--> - <!--<version>${project.version}</version>--> - <!--</dependency>--> - <!--<dependency>--> - <!--<groupId>org.apache.eagle</groupId>--> - <!--<artifactId>eagle-security-hbase-web</artifactId>--> - <!--<version>${project.version}</version>--> - <!--</dependency>--> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-client</artifactId> + </dependency> + <dependency> + <groupId>org.apache.eagle</groupId> + <artifactId>eagle-app-example</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.eagle</groupId> + <artifactId>eagle-jpm-app</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.eagle</groupId> + <artifactId>eagle-security-hbase-auditlog</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.eagle</groupId> + <artifactId>eagle-security-hbase-web</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> <build> <resources> http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/53370c2e/eagle-server/src/main/resources/application.conf ---------------------------------------------------------------------- diff --git a/eagle-server/src/main/resources/application.conf b/eagle-server/src/main/resources/application.conf index 9860245..ca5ffe6 100644 --- a/eagle-server/src/main/resources/application.conf +++ b/eagle-server/src/main/resources/application.conf @@ -22,7 +22,7 @@ "topologyLoadUpbound" : 0.8, "numOfAlertBoltsPerTopology" : 5, "zkConfig" : { - "zkQuorum" : "127.0.0.1:2181", + "zkQuorum" : "server.eagle.apache.org:2181", "zkRoot" : "/alert", "zkSessionTimeoutMs" : 10000, "connectionTimeoutMs" : 10000, @@ -42,6 +42,7 @@ "metadata":{ "store": "org.apache.eagle.metadata.service.memory.MemoryMetadataStore" }, + "connection":"jdbc:mysql://server.eagle.apache.org:3306/eagle", "application":{ "sink":{ "type": "org.apache.eagle.app.sink.KafkaStreamSink"