You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sh...@apache.org on 2015/11/19 10:01:20 UTC
incubator-atlas git commit: ATLAS-297
KafkaNotificationTest.testSendReceiveMessage fails when atlas-server is
running on the same machine (yhemanth via shwethags)
Repository: incubator-atlas
Updated Branches:
refs/heads/master 9370d4a89 -> eec811ea3
ATLAS-297 KafkaNotificationTest.testSendReceiveMessage fails when atlas-server is running on the same machine (yhemanth via shwethags)
Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/eec811ea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/eec811ea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/eec811ea
Branch: refs/heads/master
Commit: eec811ea3bee97312f3367071bc25c4605efc28b
Parents: 9370d4a
Author: Shwetha GS <ss...@hortonworks.com>
Authored: Thu Nov 19 14:31:12 2015 +0530
Committer: Shwetha GS <ss...@hortonworks.com>
Committed: Thu Nov 19 14:31:12 2015 +0530
----------------------------------------------------------------------
addons/hive-bridge/pom.xml | 4 ++--
.../org/apache/atlas/hive/hook/HiveHookIT.java | 5 +++-
client/src/main/resources/client.properties | 5 ++++
release-log.txt | 1 +
.../src/main/resources/application.properties | 8 +++++--
webapp/pom.xml | 4 ++--
.../atlas/web/resources/BaseResourceIT.java | 8 ++++---
.../service/SecureEmbeddedServerTestBase.java | 25 ++++++++++----------
8 files changed, 37 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eec811ea/addons/hive-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/pom.xml b/addons/hive-bridge/pom.xml
index 8a838ef..a61d11b 100755
--- a/addons/hive-bridge/pom.xml
+++ b/addons/hive-bridge/pom.xml
@@ -271,7 +271,7 @@
<skip>${skipTests}</skip>
<!--only skip int tests -->
<httpConnector>
- <port>21000</port>
+ <port>31000</port>
<idleTimeout>60000</idleTimeout>
</httpConnector>
<war>../../webapp/target/atlas-webapp-${project.version}.war</war>
@@ -292,7 +292,7 @@
</systemProperty>
</systemProperties>
<stopKey>atlas-stop</stopKey>
- <stopPort>21001</stopPort>
+ <stopPort>31001</stopPort>
</configuration>
<executions>
<execution>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eec811ea/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
index 9cd3159..79ec319 100755
--- a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
+++ b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
@@ -18,12 +18,14 @@
package org.apache.atlas.hive.hook;
+import org.apache.atlas.ApplicationProperties;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.ParamChecker;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataModelGenerator;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.typesystem.Referenceable;
+import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
@@ -60,7 +62,8 @@ public class HiveHookIT {
ss = SessionState.start(ss);
SessionState.setCurrentSessionState(ss);
- dgiCLient = new AtlasClient(DGI_URL);
+ Configuration configuration = ApplicationProperties.get();
+ dgiCLient = new AtlasClient(configuration.getString(HiveMetaStoreBridge.ATLAS_ENDPOINT, DGI_URL));
}
private void runCommand(String cmd) throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eec811ea/client/src/main/resources/client.properties
----------------------------------------------------------------------
diff --git a/client/src/main/resources/client.properties b/client/src/main/resources/client.properties
index 722d029..bc7bc98 100755
--- a/client/src/main/resources/client.properties
+++ b/client/src/main/resources/client.properties
@@ -35,3 +35,8 @@ atlas.http.authentication.enabled=false
atlas.http.authentication.type=simple
######### Security Properties #########
+
+######### Server Properties #########
+# Configuring a 'test' port different from where a local atlas server instance would run
+atlas.rest.address=http://localhost:31000
+######### Server Properties #########
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eec811ea/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 394a215..5e79f9e 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags)
ALL CHANGES:
+ATLAS-297 KafkaNotificationTest.testSendReceiveMessage fails when atlas-server is running on the same machine (yhemanth via shwethags)
ATLAS-306 change javadoc generation from 'package' to 'site' phase(jspeidel via sumasai)
ATLAS-289 updateEntity does not remove existing edge for multiplicity-one reference (dkantor via shwethags)
ATLAS-300 Need additional integration test coverage for entity notifications (tbeerbower via shwethags)
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eec811ea/typesystem/src/main/resources/application.properties
----------------------------------------------------------------------
diff --git a/typesystem/src/main/resources/application.properties b/typesystem/src/main/resources/application.properties
index e0d383f..4a351e6 100644
--- a/typesystem/src/main/resources/application.properties
+++ b/typesystem/src/main/resources/application.properties
@@ -16,6 +16,9 @@
# limitations under the License.
#
+######### Atlas Server Configs #########
+atlas.rest.address=http://localhost:31000
+
######### Graph Database Configs #########
# Graph Storage
atlas.graph.storage.backend=${titan.storage.backend}
@@ -58,8 +61,8 @@ atlas.lineage.hive.table.schema.query.hive_table=hive_table where name='%s'\, co
######### Notification Configs #########
atlas.notification.embedded=true
-atlas.kafka.zookeeper.connect=localhost:9026
-atlas.kafka.bootstrap.servers=localhost:9027
+atlas.kafka.zookeeper.connect=localhost:19026
+atlas.kafka.bootstrap.servers=localhost:19027
atlas.kafka.data=target/data/kafka
atlas.kafka.zookeeper.session.timeout.ms=400
atlas.kafka.zookeeper.sync.time.ms=20
@@ -71,5 +74,6 @@ atlas.kafka.entities.group.id=atlas_entities
# SSL config
atlas.enableTLS=false
+atlas.server.https.port=31443
######### Security Properties #########
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eec811ea/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 1d77b9f..e92795a 100755
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -337,7 +337,7 @@
<skip>${skipTests}</skip>
<!--only skip int tests -->
<httpConnector>
- <port>21000</port>
+ <port>31000</port>
<idleTimeout>60000</idleTimeout>
</httpConnector>
<war>${project.build.directory}/atlas-webapp-${project.version}.war</war>
@@ -374,7 +374,7 @@
</systemProperty>
</systemProperties>
<stopKey>atlas-stop</stopKey>
- <stopPort>21001</stopPort>
+ <stopPort>31001</stopPort>
<daemon>${debug.jetty.daemon}</daemon>
<testClassesDirectory>${project.build.directory}/../../webapp/target/test-classes/</testClassesDirectory>
<useTestClasspath>true</useTestClasspath>
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eec811ea/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java
index 9ceb905..6976c45 100755
--- a/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java
@@ -24,8 +24,7 @@ import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.DefaultClientConfig;
-import org.apache.atlas.AtlasClient;
-import org.apache.atlas.ParamChecker;
+import org.apache.atlas.*;
import org.apache.atlas.typesystem.Referenceable;
import org.apache.atlas.typesystem.Struct;
import org.apache.atlas.typesystem.TypesDef;
@@ -45,6 +44,7 @@ import org.apache.atlas.typesystem.types.TraitType;
import org.apache.atlas.typesystem.types.TypeUtils;
import org.apache.atlas.typesystem.types.utils.TypesUtil;
import org.apache.atlas.web.util.Servlets;
+import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.RandomStringUtils;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
@@ -64,9 +64,9 @@ import java.util.List;
*/
public abstract class BaseResourceIT {
+ public static final String ATLAS_REST_ADDRESS = "atlas.rest.address";
protected WebResource service;
protected AtlasClient serviceClient;
- public static String baseUrl = "http://localhost:21000/";
public static final Logger LOG = LoggerFactory.getLogger(BaseResourceIT.class);
@BeforeClass
@@ -74,6 +74,8 @@ public abstract class BaseResourceIT {
DefaultClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
+ Configuration configuration = ApplicationProperties.get();
+ String baseUrl = configuration.getString(ATLAS_REST_ADDRESS, "http://localhost:21000/");
client.resource(UriBuilder.fromUri(baseUrl).build());
service = client.resource(UriBuilder.fromUri(baseUrl).build());
http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/eec811ea/webapp/src/test/java/org/apache/atlas/web/service/SecureEmbeddedServerTestBase.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/service/SecureEmbeddedServerTestBase.java b/webapp/src/test/java/org/apache/atlas/web/service/SecureEmbeddedServerTestBase.java
index b8b8181..6a56c5d 100755
--- a/webapp/src/test/java/org/apache/atlas/web/service/SecureEmbeddedServerTestBase.java
+++ b/webapp/src/test/java/org/apache/atlas/web/service/SecureEmbeddedServerTestBase.java
@@ -19,9 +19,11 @@ package org.apache.atlas.web.service;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.DefaultClientConfig;
+import org.apache.atlas.ApplicationProperties;
+import org.apache.atlas.Atlas;
+import org.apache.atlas.AtlasException;
import org.apache.atlas.web.TestUtils;
import org.apache.atlas.web.resources.AdminJerseyResourceIT;
-import org.apache.atlas.web.resources.BaseResourceIT;
import org.apache.atlas.web.resources.EntityJerseyResourceIT;
import org.apache.atlas.web.resources.MetadataDiscoveryJerseyResourceIT;
import org.apache.atlas.web.resources.RexsterGraphJerseyResourceIT;
@@ -35,7 +37,6 @@ import org.apache.hadoop.security.alias.JavaKeyStoreProvider;
import org.testng.Assert;
import org.testng.TestListenerAdapter;
import org.testng.TestNG;
-import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -57,10 +58,12 @@ import static org.apache.atlas.security.SecurityProperties.TRUSTSTORE_PASSWORD_K
public class SecureEmbeddedServerTestBase {
+ public static final int ATLAS_DEFAULT_HTTPS_PORT = 21443;
private SecureEmbeddedServer secureEmbeddedServer;
protected String providerUrl;
private Path jksPath;
protected WebResource service;
+ private int securePort;
static {
//for localhost testing only
@@ -79,13 +82,9 @@ public class SecureEmbeddedServerTestBase {
}
@BeforeClass
- public void setupServerURI() throws Exception {
- BaseResourceIT.baseUrl = "https://localhost:21443";
- }
-
- @AfterClass
- public void resetServerURI() throws Exception {
- BaseResourceIT.baseUrl = "http://localhost:21000";
+ public void setupSecurePort() throws AtlasException {
+ org.apache.commons.configuration.Configuration configuration = ApplicationProperties.get();
+ securePort = configuration.getInt(Atlas.ATLAS_SERVER_HTTPS_PORT, ATLAS_DEFAULT_HTTPS_PORT);
}
@BeforeMethod
@@ -93,7 +92,7 @@ public class SecureEmbeddedServerTestBase {
jksPath = new Path(Files.createTempDirectory("tempproviders").toString(), "test.jks");
providerUrl = JavaKeyStoreProvider.SCHEME_NAME + "://file/" + jksPath.toUri();
- String baseUrl = "https://localhost:21443/";
+ String baseUrl = String.format("https://localhost:%d/", securePort);
DefaultClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
@@ -106,7 +105,7 @@ public class SecureEmbeddedServerTestBase {
public void testNoConfiguredCredentialProvider() throws Exception {
try {
- secureEmbeddedServer = new SecureEmbeddedServer(21443, TestUtils.getWarPath());
+ secureEmbeddedServer = new SecureEmbeddedServer(securePort, TestUtils.getWarPath());
secureEmbeddedServer.server.start();
Assert.fail("Should have thrown an exception");
@@ -125,7 +124,7 @@ public class SecureEmbeddedServerTestBase {
configuration.setProperty(CERT_STORES_CREDENTIAL_PROVIDER_PATH, providerUrl);
try {
- secureEmbeddedServer = new SecureEmbeddedServer(21443, TestUtils.getWarPath()) {
+ secureEmbeddedServer = new SecureEmbeddedServer(securePort, TestUtils.getWarPath()) {
@Override
protected PropertiesConfiguration getConfiguration() {
return configuration;
@@ -152,7 +151,7 @@ public class SecureEmbeddedServerTestBase {
setupCredentials();
try {
- secureEmbeddedServer = new SecureEmbeddedServer(21443, TestUtils.getWarPath()) {
+ secureEmbeddedServer = new SecureEmbeddedServer(securePort, TestUtils.getWarPath()) {
@Override
protected PropertiesConfiguration getConfiguration() {
return configuration;