Commit b82ff048 by Shwetha GS

ATLAS-354 Kerberized cluster: quick_start.py fails to add sample data (shwethags)

parent 51656991
...@@ -32,11 +32,6 @@ ...@@ -32,11 +32,6 @@
</property> </property>
<property> <property>
<name>atlas.rest.address</name>
<value>http://localhost:21000/</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name> <name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:derby:${user.dir}/target/metastore_db;create=true</value> <value>jdbc:derby:${user.dir}/target/metastore_db;create=true</value>
</property> </property>
......
...@@ -127,7 +127,7 @@ public class AtlasClient { ...@@ -127,7 +127,7 @@ public class AtlasClient {
} }
protected Configuration getClientProperties() throws AtlasException { protected Configuration getClientProperties() throws AtlasException {
return ApplicationProperties.get(ApplicationProperties.CLIENT_PROPERTIES); return ApplicationProperties.get();
} }
enum API { enum API {
......
...@@ -80,4 +80,4 @@ atlas.lineage.hive.table.schema.query.Table=Table where name='%s'\, columns ...@@ -80,4 +80,4 @@ atlas.lineage.hive.table.schema.query.Table=Table where name='%s'\, columns
# SSL config # SSL config
atlas.enableTLS=false atlas.enableTLS=false
######### Security Properties ######### atlas.rest.address=http://localhost:21000
\ No newline at end of file
---+ Configuring Apache Atlas ---+ Configuring Apache Atlas - Application Properties
---++ Introduction All configuration in Atlas uses java properties style configuration. The main configuration file is application.properties which is in the *conf* dir at the deployed location. It consists of the following sections:
All configuration in Atlas uses java properties style configuration.
---++ Application Properties ---++ Graph Configs
The main configuration file is application.properties which is in the *conf* dir at the deployed ---+++ Graph persistence engine
location. It consists of the following sections:
---+++ Graph Database Configs
---++++ Graph persistence engine
This section sets up the graph db - titan - to use a persistence engine. Please refer to This section sets up the graph db - titan - to use a persistence engine. Please refer to
<a href="http://s3.thinkaurelius.com/docs/titan/0.5.4/titan-config-ref.html">link</a> for more <a href="http://s3.thinkaurelius.com/docs/titan/0.5.4/titan-config-ref.html">link</a> for more
...@@ -22,7 +16,7 @@ atlas.graph.storage.backend=berkeleyje ...@@ -22,7 +16,7 @@ atlas.graph.storage.backend=berkeleyje
atlas.graph.storage.directory=data/berkley atlas.graph.storage.directory=data/berkley
</verbatim> </verbatim>
---+++++ Graph persistence engine - Hbase ---++++ Graph persistence engine - Hbase
Basic configuration Basic configuration
...@@ -59,8 +53,7 @@ Without Ranger, HBase shell can be used to set the permissions. ...@@ -59,8 +53,7 @@ Without Ranger, HBase shell can be used to set the permissions.
echo "grant 'atlas', 'RWXCA', 'titan'" | hbase shell echo "grant 'atlas', 'RWXCA', 'titan'" | hbase shell
</verbatim> </verbatim>
---++++ Graph Search Index ---+++ Graph Search Index
This section sets up the graph db - titan - to use an search indexing system. The example This section sets up the graph db - titan - to use an search indexing system. The example
configuration below sets up to use an embedded Elastic search indexing system. configuration below sets up to use an embedded Elastic search indexing system.
...@@ -100,22 +93,22 @@ Solr in cloud mode is the recommended setup. ...@@ -100,22 +93,22 @@ Solr in cloud mode is the recommended setup.
---+++ Switching Persistence Backend ---+++ Switching Persistence Backend
For switching the storage backend from BerkeleyDB to HBase and vice versa, refer the documentation for "Graph Persistence Engine" described above and restart ATLAS. For switching the storage backend from BerkeleyDB to HBase and vice versa, refer the documentation for "Graph Persistence Engine" described above and restart ATLAS.
The data in the indexing backend needs to be cleared else there will be discrepancies between the storage and indexing backend which could result in errors during the search. The data in the indexing backend needs to be cleared else there will be discrepancies between the storage and indexing backend which could result in errors during the search.
ElasticSearch runs by default in embedded mode and the data could easily be cleared by deleting the ATLAS_HOME/data/es directory. ElasticSearch runs by default in embedded mode and the data could easily be cleared by deleting the ATLAS_HOME/data/es directory.
For Solr, the collections which were created during ATLAS Installation - vertex_index, edge_index, fulltext_index could be deleted which will cleanup the indexes For Solr, the collections which were created during ATLAS Installation - vertex_index, edge_index, fulltext_index could be deleted which will cleanup the indexes
---+++ Switching Index Backend ---+++ Switching Index Backend
Switching the Index backend requires clearing the persistence backend data. Otherwise there will be discrepancies between the persistence and index backends since switching the indexing backend means index data will be lost. Switching the Index backend requires clearing the persistence backend data. Otherwise there will be discrepancies between the persistence and index backends since switching the indexing backend means index data will be lost.
This leads to "Fulltext" queries not working on the existing data This leads to "Fulltext" queries not working on the existing data
For clearing the data for BerkeleyDB, delete the ATLAS_HOME/data/berkeley directory For clearing the data for BerkeleyDB, delete the ATLAS_HOME/data/berkeley directory
For clearing the data for HBase, in Hbase shell, run 'disable titan' and 'drop titan' For clearing the data for HBase, in Hbase shell, run 'disable titan' and 'drop titan'
---+++ Hive Lineage Configs
The higher layer services like hive lineage, schema, etc. are driven by the type system and this ---++ Lineage Configs
section encodes the specific types for the hive data model.
The higher layer services like lineage, schema, etc. are driven by the type system and this section encodes the specific types for the hive data model.
# This models reflects the base super types for Data and Process # This models reflects the base super types for Data and Process
<verbatim> <verbatim>
...@@ -128,7 +121,8 @@ atlas.lineage.hive.process.outputs.name=outputs ...@@ -128,7 +121,8 @@ atlas.lineage.hive.process.outputs.name=outputs
atlas.lineage.hive.table.schema.query=hive_table where name=?, columns atlas.lineage.hive.table.schema.query=hive_table where name=?, columns
</verbatim> </verbatim>
---+++ Notification Configs
---++ Notification Configs
Refer http://kafka.apache.org/documentation.html#configuration for Kafka configuration. All Kafka configs should be prefixed with 'atlas.kafka.' Refer http://kafka.apache.org/documentation.html#configuration for Kafka configuration. All Kafka configs should be prefixed with 'atlas.kafka.'
<verbatim> <verbatim>
...@@ -149,16 +143,17 @@ atlas.kafka.entities.group.id=<consumer id> ...@@ -149,16 +143,17 @@ atlas.kafka.entities.group.id=<consumer id>
</verbatim> </verbatim>
---+++ Client Configs ---++ Client Configs
<verbatim> <verbatim>
atlas.client.readTimeoutMSecs=60000 atlas.client.readTimeoutMSecs=60000
atlas.client.connectTimeoutMSecs=60000 atlas.client.connectTimeoutMSecs=60000
atlas.rest.address=<http/https>://<atlas-fqdn>:<atlas port> - default http://localhost:21000
</verbatim> </verbatim>
---+++ Security Properties ---++ Security Properties
---++++ SSL config ---+++ SSL config
The following property is used to toggle the SSL feature. The following property is used to toggle the SSL feature.
<verbatim> <verbatim>
......
...@@ -184,6 +184,9 @@ with multiple atlas upgrades), set environment variable METADATA_CONF to the pat ...@@ -184,6 +184,9 @@ with multiple atlas upgrades), set environment variable METADATA_CONF to the pat
*Using Atlas* *Using Atlas*
<verbatim> <verbatim>
* Quick start model - sample model and data
bin/quick_start.py [<atlas endpoint>]
* Verify if the server is up and running * Verify if the server is up and running
curl -v http://localhost:21000/api/atlas/admin/version curl -v http://localhost:21000/api/atlas/admin/version
{"Version":"v0.1"} {"Version":"v0.1"}
......
...@@ -80,7 +80,8 @@ The properties for configuring the SPNEGO support are: ...@@ -80,7 +80,8 @@ The properties for configuring the SPNEGO support are:
* <code>atlas.http.authentication.type</code> (simple|kerberos) [default: simple] - the authentication type * <code>atlas.http.authentication.type</code> (simple|kerberos) [default: simple] - the authentication type
* <code>atlas.http.authentication.kerberos.principal</code> - the web-application Kerberos principal name. The Kerberos principal name must start with "HTTP/...". For example: "HTTP/localhost@LOCALHOST". There is no default value. * <code>atlas.http.authentication.kerberos.principal</code> - the web-application Kerberos principal name. The Kerberos principal name must start with "HTTP/...". For example: "HTTP/localhost@LOCALHOST". There is no default value.
* <code>atlas.http.authentication.kerberos.keytab</code> - the path to the keytab file containing the credentials for the kerberos principal. * <code>atlas.http.authentication.kerberos.keytab</code> - the path to the keytab file containing the credentials for the kerberos principal.
* <code>atlas.rest.address</code> - <http/https>://<atlas-fqdn>:<atlas port>
For a more detailed discussion of the HTTP authentication mechanism refer to [[http://hadoop.apache.org/docs/stable/hadoop-auth/Configuration.html][Hadoop Auth, Java HTTP SPNEGO 2.6.0 - Server Side Configuration]]. The prefix that document references is "atlas.http.authentication" in the case of the Atlas authentication implementation. For a more detailed discussion of the HTTP authentication mechanism refer to [[http://hadoop.apache.org/docs/stable/hadoop-auth/Configuration.html][Hadoop Auth, Java HTTP SPNEGO 2.6.0 - Server Side Configuration]]. The prefix that document references is "atlas.http.authentication" in the case of the Atlas authentication implementation.
---+++ Client security configuration ---+++ Client security configuration
......
...@@ -14,6 +14,7 @@ ATLAS-54 Rename configs in hive hook (shwethags) ...@@ -14,6 +14,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags) ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-354 Kerberized cluster: quick_start.py fails to add sample data (shwethags)
ATLAS-47 Entity mutations for complex types (sumasai via shwethags) ATLAS-47 Entity mutations for complex types (sumasai via shwethags)
ATLAS-345 UI: Should allow tag addition on any search result that returns a reference-able entity (darshankumar89 via shwethags) ATLAS-345 UI: Should allow tag addition on any search result that returns a reference-able entity (darshankumar89 via shwethags)
ATLAS-279 UI not displaying results for certain successful "select" search queries (anilsg via shwethags) ATLAS-279 UI not displaying results for certain successful "select" search queries (anilsg via shwethags)
......
...@@ -20,7 +20,9 @@ package org.apache.atlas.examples; ...@@ -20,7 +20,9 @@ package org.apache.atlas.examples;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import org.apache.atlas.ApplicationProperties;
import org.apache.atlas.AtlasClient; import org.apache.atlas.AtlasClient;
import org.apache.atlas.AtlasException;
import org.apache.atlas.typesystem.Referenceable; import org.apache.atlas.typesystem.Referenceable;
import org.apache.atlas.typesystem.TypesDef; import org.apache.atlas.typesystem.TypesDef;
import org.apache.atlas.typesystem.json.InstanceSerialization; import org.apache.atlas.typesystem.json.InstanceSerialization;
...@@ -36,6 +38,7 @@ import org.apache.atlas.typesystem.types.Multiplicity; ...@@ -36,6 +38,7 @@ import org.apache.atlas.typesystem.types.Multiplicity;
import org.apache.atlas.typesystem.types.StructTypeDefinition; import org.apache.atlas.typesystem.types.StructTypeDefinition;
import org.apache.atlas.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import org.apache.atlas.typesystem.types.utils.TypesUtil; import org.apache.atlas.typesystem.types.utils.TypesUtil;
import org.apache.commons.configuration.Configuration;
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONArray;
import java.util.List; import java.util.List;
...@@ -46,6 +49,7 @@ import java.util.List; ...@@ -46,6 +49,7 @@ import java.util.List;
* todo - move this to examples module. * todo - move this to examples module.
*/ */
public class QuickStart { public class QuickStart {
public static final String ATLAS_REST_ADDRESS = "atlas.rest.address";
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
String baseUrl = getServerUrl(args); String baseUrl = getServerUrl(args);
...@@ -61,10 +65,16 @@ public class QuickStart { ...@@ -61,10 +65,16 @@ public class QuickStart {
quickStart.search(); quickStart.search();
} }
static String getServerUrl(String[] args) { static String getServerUrl(String[] args) throws AtlasException {
String baseUrl = "http://localhost:21000";
if (args.length > 0) { if (args.length > 0) {
baseUrl = args[0]; return args[0];
}
Configuration configuration = ApplicationProperties.get();
String baseUrl = configuration.getString(ATLAS_REST_ADDRESS);
if (baseUrl == null) {
System.out.println("Usage: quick_start.py <atlas endpoint of format <http/https>://<atlas-fqdn>:<atlas port> like http://localhost:21000>");
System.exit(-1);
} }
return baseUrl; return baseUrl;
......
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