Commit c7b82387 by Venkatesh Seetharam

BUG-33250 Apache Incubation Related changes. Contributed by Venkatesh Seetharam

parent 398286a9
Apache Metadata Governance is an effort undergoing incubation at the Apache
Software Foundation (ASF), sponsored by the Apache Incubator PMC.
Incubation is required of all newly accepted projects until a further
review indicates that the infrastructure, communications, and decision
making process have stabilized in a manner consistent with other
successful ASF projects.
While incubation status is not necessarily a reflection of the
completeness or stability of the code, it does indicate that the
project has yet to be fully endorsed by the ASF.
For more information about the incubation status of the Metadata Governance
project you can go to the following page:
http://incubator.apache.org/projects/Metadata-Governance.html
\ No newline at end of file
This diff is collapsed. Click to expand it.
Apache DGI (incubating)
Copyright 2011-2014 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
......@@ -16,9 +16,17 @@
Metadata and Governance Overview
This aims to provide a simple repository for storing entities and associated
relationships among other entities.
The Data Governance Initiative, DGI, framework is an extensible set of core
foundational governance services – enabling enterprises to effectively and
efficiently meet their compliance requirements within Hadoop and allows
integration with the whole enterprise data ecosystem.
The goal is to capture lineage for both entities and its associated instances.
It also captures provenance, lineage, classification, etc. associated with each
of the entities in th metadata repository.
This will provide true visibility in Hadoop by using both a prescriptive
and forensic model, along with technical and operational audit as well as
lineage enriched by business taxonomical metadata. It also enables any
metadata consumer to work inter-operably without discrete interfaces to
each other -- the metadata store is common.
The metadata veracity is maintained by leveraging Apache Ranger to prevent
non-authorized access paths to data at runtime.
Security is both role based (RBAC) and attribute based (ABAC).
......@@ -61,7 +61,13 @@
<url>https://builds.apache.org/job/XXX</url>
</ciManagement>
<inceptionYear>2014</inceptionYear>
<inceptionYear>2015</inceptionYear>
<scm>
<connection>scm:git:https://github.com/hortonworks/metadata</connection>
<developerConnection>scm:git:https://github.com/hortonworks/metadata</developerConnection>
<url>https://github.com/hortonworks/metadata</url>
</scm>
<properties>
<!-- platform encoding override -->
......@@ -723,7 +729,39 @@
</dependencyManagement>
<build>
<finalName>metadata-governance</finalName>
<directory>target</directory>
<outputDirectory>target/classes</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>target/test-classes</testOutputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/conf</directory>
<filtering>false</filtering>
<includes>
<include>application.properties</include>
<include>graph.properties</include>
<include>log4j.xml</include>
</includes>
</resource>
<resource>
<directory>..</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
......@@ -905,11 +943,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<!--
<!--
<configuration>
<skipTests>true</skipTests>
</configuration>
-->
-->
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
......@@ -970,6 +1008,24 @@
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<revisionOnScmFailure>release</revisionOnScmFailure>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
</plugins>
</build>
......
......@@ -77,7 +77,7 @@
<files>
<file>
<source>webapp/target/metadata-governance.war</source>
<source>webapp/target/metadata-webapp-${project.version}.war</source>
<outputDirectory>server/webapp</outputDirectory>
<destName>metadata.war</destName>
</file>
......
......@@ -134,16 +134,19 @@
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-guice</artifactId>
......@@ -208,8 +211,7 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/webapps
</outputDirectory>
<outputDirectory>${project.build.directory}/webapps</outputDirectory>
<resources>
<resource>
<directory>src/conf</directory>
......
......@@ -18,6 +18,8 @@
package org.apache.hadoop.metadata.web.resources;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.metadata.web.util.Servlets;
import org.codehaus.jettison.json.JSONException;
......@@ -78,13 +80,20 @@ public class AdminResource {
public Response getVersion() {
if (version == null) {
try {
PropertiesConfiguration configProperties =
new PropertiesConfiguration("metadata-buildinfo.properties");
JSONObject response = new JSONObject();
response.put("Version", "v0.1"); // todo: get version
response.put("Version", configProperties.getString("build.version", "UNKNOWN"));
response.put("Name",
configProperties.getString("project.name", "metadata-governance"));
response.put("Description", configProperties.getString("project.description",
"Metadata Management and Data Governance Platform over Hadoop"));
// todo: add hadoop version?
// response.put("Hadoop", VersionInfo.getVersion() + "-r" + VersionInfo
// .getRevision());
// response.put("Hadoop", VersionInfo.getVersion() + "-r" + VersionInfo.getRevision());
version = Response.ok(response).build();
} catch (JSONException e) {
} catch (JSONException | ConfigurationException e) {
throw new WebApplicationException(
Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
}
......
......@@ -17,12 +17,12 @@
#
######################
*.domain=all
*.build.user=${user.name}
*.build.epoch=${timestamp}
*.project.version=${pom.version}
*.build.version=${pom.version}-r${buildNumber}
*.vc.revision=${buildNumber}
*.vc.source.url=${scm.connection}
project.name=${pom.parent.name}
project.description=${pom.parent.description}
build.user=${user.name}
build.epoch=${timestamp}
project.version=${pom.version}
build.version=${pom.version}-r${buildNumber}
vc.revision=${buildNumber}
vc.source.url=${scm.connection}
######################
/**
* 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.hadoop.metadata.web.resources;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.codehaus.jettison.json.JSONObject;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import javax.ws.rs.HttpMethod;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
/**
* Integration test for Admin jersey resource.
*/
public class AdminJerseyResourceIT extends BaseResourceIT {
@BeforeClass
public void setUp() throws Exception {
super.setUp();
}
@Test
public void testGetVersion() throws Exception {
WebResource resource = service
.path("api/metadata/admin/version");
ClientResponse clientResponse = resource
.accept(MediaType.APPLICATION_JSON)
.type(MediaType.APPLICATION_JSON)
.method(HttpMethod.GET, ClientResponse.class);
Assert.assertEquals(clientResponse.getStatus(), Response.Status.OK.getStatusCode());
String responseAsString = clientResponse.getEntity(String.class);
Assert.assertNotNull(responseAsString);
PropertiesConfiguration buildConfiguration =
new PropertiesConfiguration("metadata-buildinfo.properties");
JSONObject response = new JSONObject(responseAsString);
Assert.assertEquals(response.get("Version"),
buildConfiguration.getString("build.version"));
Assert.assertEquals(response.get("Name"),
buildConfiguration.getString("project.name"));
Assert.assertEquals(response.get("Description"),
buildConfiguration.getString("project.description"));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment