Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 99 additions & 4 deletions distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<properties>
<cassandra.embedded>false</cassandra.embedded>
<elasticsearch.managed>false</elasticsearch.managed>
<entity.repository.properties>atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.HBaseBasedAuditRepository</entity.repository.properties>
<!-- entity.repository.properties: inherited from root pom (atlas.EntityAuditRepository.impl=${entity.repository.impl}); overridden by -Paudit-* / -Pdist on the reactor -->
<graph.index.backend>solr</graph.index.backend>
<graph.index.properties>#Solr
#Solr cloud mode properties
Expand All @@ -60,11 +60,11 @@ atlas.graph.index.search.solr.wait-searcher=false
# plugins: https://docs.janusgraph.org/latest/elasticsearch.html
#atlas.graph.index.search.hostname=localhost
#atlas.graph.index.search.elasticsearch.client-only=true</graph.index.properties>
<graph.storage.backend>hbase2</graph.storage.backend>
<!-- graph.storage.backend: set in root pom (dist / storage-* profiles); do not hardcode here or -Pstorage-cassandra is ignored -->
<graph.storage.properties>#Hbase
#For standalone mode , specify localhost
#for distributed mode, specify zookeeper quorum here
atlas.graph.storage.hostname=
#for distributed mode, specify zookeeper quorum here (comma-separated); empty values break Janus STRING options.
atlas.graph.storage.hostname=localhost
atlas.graph.storage.hbase.regions-per-server=1

#In order to use Cassandra as a backend, comment out the hbase specific properties above, and uncomment the
Expand Down Expand Up @@ -588,6 +588,101 @@ atlas.graph.storage.hbase.regions-per-server=1</graph.storage.properties>
</plugins>
</build>
</profile>
<!--
JIRA (slim packaging): -Pdist,storage-hbase,index-solr,audit-hbase only wires backend/audit choices
in the build (graph.storage.backend, index backend, audit impl). It does NOT set localhost HBase host,
Solr ZK URL, embedded mode, or download HBase/Solr — deployers configure cluster endpoints in conf/ after build.
For a local, ready-to-run tarball with bundled HBase+Solr and dev-oriented defaults, use -Pembedded-hbase-solr.
Other examples: Berkeley/RDBMS/Cassandra blocks below; Berkeley+Solr bundle: -Pberkeley-solr.
-->
<profile>
<id>storage-berkeleyje</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<graph.storage.properties># BerkeleyJE — local graph under ATLAS_HOME; edit paths if needed
atlas.graph.storage.directory=${sys:atlas.home}/data/berkeley
atlas.graph.storage.lock.clean-expired=true
atlas.graph.storage.lock.expiry-time=500
atlas.graph.storage.lock.wait-time=300</graph.storage.properties>
</properties>
</profile>
<profile>
<id>storage-rdbms</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<graph.storage.properties># RDBMS — PostgreSQL example; edit host, db, user, password before starting Atlas
atlas.graph.storage.rdbms.jpa.hikari.connectionTestQuery=select 1
atlas.graph.storage.rdbms.jpa.hikari.connectionTimeout=30000
atlas.graph.storage.rdbms.jpa.hikari.driverClassName=org.postgresql.Driver
atlas.graph.storage.rdbms.jpa.hikari.idleTimeout=300000
atlas.graph.storage.rdbms.jpa.hikari.jdbcUrl=jdbc:postgresql://localhost:5432/atlas
atlas.graph.storage.rdbms.jpa.hikari.maxLifetime=1800000
atlas.graph.storage.rdbms.jpa.hikari.maximumPoolSize=40
atlas.graph.storage.rdbms.jpa.hikari.minimumIdle=5
atlas.graph.storage.rdbms.jpa.hikari.password=atlas
atlas.graph.storage.rdbms.jpa.hikari.username=atlas
atlas.graph.storage.rdbms.jpa.javax.persistence.jdbc.dialect=org.eclipse.persistence.platform.database.PostgreSQLPlatform
atlas.graph.storage.rdbms.jpa.javax.persistence.schema-generation.create-database-schemas=true
atlas.graph.storage.rdbms.jpa.javax.persistence.schema-generation.create-script-source=META-INF/postgres/create_schema.sql
atlas.graph.storage.rdbms.jpa.javax.persistence.schema-generation.create-source=script
atlas.graph.storage.rdbms.jpa.javax.persistence.schema-generation.database.action=create</graph.storage.properties>
</properties>
</profile>
<profile>
<id>index-elasticsearch</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<graph.index.backend>elasticsearch</graph.index.backend>
<graph.index.properties># Elasticsearch — set hostname to your cluster or load balancer
atlas.graph.index.search.elasticsearch.client-only=true
atlas.graph.index.search.hostname=localhost</graph.index.properties>
</properties>
</profile>
<profile>
<id>storage-cassandra</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<graph.storage.properties># Janus CQL — point at your Cassandra nodes (comma-separated). Keyspace is created/used by Janus as configured.
atlas.graph.storage.cql.keyspace=janusgraph
atlas.graph.storage.hostname=127.0.0.1</graph.storage.properties>
</properties>
</profile>
<profile>
<id>audit-cassandra</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<entity.repository.properties>atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.CassandraBasedAuditRepository</entity.repository.properties>
</properties>
</profile>
<profile>
<id>index-solr</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<graph.index.properties># Solr Cloud (set zookeeper-url to your Solr/ZK ensemble)
atlas.graph.index.search.solr.mode=cloud
atlas.graph.index.search.solr.zookeeper-url=localhost:2181
atlas.graph.index.search.solr.zookeeper-connect-timeout=60000
atlas.graph.index.search.solr.zookeeper-session-timeout=60000
atlas.graph.index.search.solr.wait-searcher=false

# Solr http mode (alternative)
#atlas.graph.index.search.solr.mode=http
#atlas.graph.index.search.solr.http-urls=http://localhost:8983/solr</graph.index.properties>
</properties>
</profile>

<!-- profile to package and configure embedded cassandra and solr with the distribution -->
<profile>
<id>embedded-cassandra-solr</id>
Expand Down
9 changes: 8 additions & 1 deletion distro/src/bin/atlas_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,14 @@ def hbaseBinDir(dir):
return os.path.join(dir, "hbase", BIN)

def hbaseConfDir(dir):
return os.environ.get(HBASE_CONF_DIR, os.path.join(dir, "hbase", CONF))
"""Resolve HBase client conf dir. Relative HBASE_CONF_DIR is resolved against Atlas home so
atlas_start.py works when run from bin/ (cwd is not the install root)."""
conf = os.environ.get(HBASE_CONF_DIR)
if conf:
if not os.path.isabs(conf):
conf = os.path.normpath(os.path.join(dir, conf))
return conf
return os.path.join(dir, "hbase", CONF)

def zookeeperBinDir(dir):
return os.environ.get(SOLR_BIN, os.path.join(dir, "zk", BIN))
Expand Down
16 changes: 10 additions & 6 deletions distro/src/conf/atlas-application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,25 @@

######### Graph Database Configs #########

atlas.build.storage.backend=${atlas.storage.backend}
atlas.build.index.backend=${atlas.index.backend}

# Graph Database

#Configures the graph database to use. Defaults to JanusGraph
#atlas.graphdb.backend=org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphDatabase

# Graph Storage
# Set atlas.graph.storage.backend to the correct value for your desired storage
# backend. Possible values:
# Set atlas.graph.storage.backend to the JanusGraph storage short name (see Janus docs).
# Common values:
#
# hbase
# cassandra
# embeddedcassandra - Should only be set by building Atlas with -Pdist,embedded-cassandra-solr
# hbase2 (HBase 2.x; Atlas builds often set this via Maven graph.storage.backend)
# cql (Cassandra via Janus CQL backend — use this, not the word "cassandra", or Janus will look for a Java class)
# embeddedcassandra - Only when building with -Pdist,embedded-cassandra-solr (Atlas embedded stack)
# berkeleyje
# rdbms
#
# See the configuration documentation for more information about configuring the various storage backends.
# See the configuration documentation for more information about configuring the various storage backends.
#
atlas.graph.storage.backend=${graph.storage.backend}
atlas.graph.storage.hbase.table=apache_atlas_janus
Expand Down
9 changes: 9 additions & 0 deletions distro/src/main/assemblies/atlas-server-package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@
<directoryMode>0755</directoryMode>
</fileSet>

<!-- Default external-HBase build has no target/hbase; ship minimal client conf so atlas_start.py finds hbase-site.xml.
Builds with -Pembedded-hbase-solr unpack full HBase below, which overwrites/extends this tree. -->
<fileSet>
<directory>src/main/hbase-conf</directory>
<outputDirectory>hbase/conf</outputDirectory>
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>

<fileSet>
<directory>target/hbase</directory>
<outputDirectory>hbase</outputDirectory>
Expand Down
7 changes: 7 additions & 0 deletions distro/src/main/assemblies/standalone-package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@
<directoryMode>0755</directoryMode>
</fileSet>

<fileSet>
<directory>src/main/hbase-conf</directory>
<outputDirectory>hbase/conf</outputDirectory>
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>

<fileSet>
<directory>target/hbase</directory>
<outputDirectory>hbase</outputDirectory>
Expand Down
31 changes: 31 additions & 0 deletions distro/src/main/hbase-conf/hbase-site.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
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.

Minimal HBase client configuration for Atlas (replace or set HBASE_CONF_DIR in production).
-->
<configuration>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
</configuration>
Loading