Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
c91f582a
Commit
c91f582a
authored
Dec 06, 2016
by
Suma Shivaprasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1342 Titan Solrclient - Add timeouts for zookeeper connect and session (sumasai)
parent
a1f9008b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
1 deletion
+28
-1
pom.xml
distro/pom.xml
+4
-0
atlas-log4j.xml
distro/src/conf/atlas-log4j.xml
+1
-1
Configuration.twiki
docs/src/site/twiki/Configuration.twiki
+2
-0
InstallationSteps.twiki
docs/src/site/twiki/InstallationSteps.twiki
+2
-0
Solr5Index.java
.../com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
+15
-0
Titan0Graph.java
...g/apache/atlas/repository/graphdb/titan0/Titan0Graph.java
+3
-0
release-log.txt
release-log.txt
+1
-0
No files found.
distro/pom.xml
View file @
c91f582a
...
...
@@ -45,6 +45,8 @@ atlas.graph.storage.lock.wait-time=10000
#Solr cloud mode properties
atlas.graph.index.search.solr.mode=cloud
atlas.graph.index.search.solr.zookeeper-url=
atlas.graph.index.search.solr.zookeeper-connect-timeout=60000
atlas.graph.index.search.solr.zookeeper-session-timeout=60000
#Solr http mode properties
#atlas.graph.index.search.solr.mode=http
...
...
@@ -162,6 +164,8 @@ atlas.graph.storage.lock.wait-time=10000
#Solr cloud mode properties
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
#Solr http mode properties
#atlas.graph.index.search.solr.mode=http
...
...
distro/src/conf/atlas-log4j.xml
View file @
c91f582a
...
...
@@ -65,7 +65,7 @@
</logger>
<logger
name=
"com.thinkaurelius.titan"
additivity=
"false"
>
<level
value=
"
warn
"
/>
<level
value=
"
info
"
/>
<appender-ref
ref=
"FILE"
/>
</logger>
...
...
docs/src/site/twiki/Configuration.twiki
View file @
c91f582a
...
...
@@ -78,6 +78,8 @@ Please note that Solr installation in Cloud mode is a prerequisite before config
atlas.graph.index.search.backend=solr5
atlas.graph.index.search.solr.mode=cloud
atlas.graph.index.search.solr.zookeeper-url=<the ZK quorum setup for solr as comma separated value> eg: 10.1.6.4:2181,10.1.6.5:2181
atlas.graph.index.search.solr.zookeeper-connect-timeout=<SolrCloud Zookeeper Connection Timeout>. Default value is 60000 ms
atlas.graph.index.search.solr.zookeeper-session-timeout=<SolrCloud Zookeeper Session Timeout>. Default value is 60000 ms
</verbatim>
Also note that if the embedded-hbase-solr profile is used then Solr is included in the distribution so that a standalone
...
...
docs/src/site/twiki/InstallationSteps.twiki
View file @
c91f582a
...
...
@@ -268,6 +268,8 @@ For configuring Titan to work with Solr, please follow the instructions below
atlas.graph.index.search.backend=solr5
atlas.graph.index.search.solr.mode=cloud
atlas.graph.index.search.solr.zookeeper-url=<the ZK quorum setup for solr as comma separated value> eg: 10.1.6.4:2181,10.1.6.5:2181
atlas.graph.index.search.solr.zookeeper-connect-timeout=<SolrCloud Zookeeper Connection Timeout>. Default value is 60000 ms
atlas.graph.index.search.solr.zookeeper-session-timeout=<SolrCloud Zookeeper Session Timeout>. Default value is 60000 ms
</verbatim>
* Restart Atlas
...
...
graphdb/titan0/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
View file @
c91f582a
...
...
@@ -142,6 +142,14 @@ public class Solr5Index implements IndexProvider {
"URL of the Zookeeper instance coordinating the SolrCloud cluster"
,
ConfigOption
.
Type
.
MASKABLE
,
"localhost:2181"
);
public
static
final
ConfigOption
<
Integer
>
ZOOKEEPER_CONNECT_TIMEOUT
=
new
ConfigOption
<
Integer
>(
SOLR_NS
,
"zookeeper-connect-timeout"
,
"SolrCloud Zookeeper connect timeout"
,
ConfigOption
.
Type
.
MASKABLE
,
60000
);
public
static
final
ConfigOption
<
Integer
>
ZOOKEEPER_SESSION_TIMEOUT
=
new
ConfigOption
<
Integer
>(
SOLR_NS
,
"zookeeper-session-timeout"
,
"SolrCloud Zookeeper session timeout"
,
ConfigOption
.
Type
.
MASKABLE
,
60000
);
public
static
final
ConfigOption
<
Integer
>
NUM_SHARDS
=
new
ConfigOption
<
Integer
>(
SOLR_NS
,
"num-shards"
,
"Number of shards for a collection. This applies when creating a new collection which is only supported under the SolrCloud operation mode."
,
ConfigOption
.
Type
.
GLOBAL_OFFLINE
,
1
);
...
...
@@ -210,6 +218,13 @@ public class Solr5Index implements IndexProvider {
HttpClientUtil
.
setConfigurer
(
new
Krb5HttpClientConfigurer
());
String
zookeeperUrl
=
config
.
get
(
Solr5Index
.
ZOOKEEPER_URL
);
CloudSolrClient
cloudServer
=
new
CloudSolrClient
(
zookeeperUrl
,
true
);
logger
.
info
(
"Zookeeper connect timeout : "
+
config
.
get
(
ZOOKEEPER_CONNECT_TIMEOUT
));
cloudServer
.
setZkConnectTimeout
(
config
.
get
(
ZOOKEEPER_CONNECT_TIMEOUT
));
logger
.
info
(
"Zookeeper session timeout : "
+
config
.
get
(
ZOOKEEPER_SESSION_TIMEOUT
));
cloudServer
.
setZkClientTimeout
(
config
.
get
(
ZOOKEEPER_SESSION_TIMEOUT
));
cloudServer
.
connect
();
solrClient
=
cloudServer
;
}
else
if
(
mode
==
Mode
.
HTTP
)
{
...
...
graphdb/titan0/src/main/java/org/apache/atlas/repository/graphdb/titan0/Titan0Graph.java
View file @
c91f582a
...
...
@@ -30,6 +30,7 @@ import java.util.Map;
import
java.util.Set
;
import
javax.script.Bindings
;
import
javax.script.ScriptContext
;
import
javax.script.ScriptEngine
;
import
javax.script.ScriptEngineManager
;
import
javax.script.ScriptException
;
...
...
@@ -282,6 +283,8 @@ public class Titan0Graph implements AtlasGraph<Titan0Vertex, Titan0Edge> {
ScriptEngine
engine
=
manager
.
getEngineByName
(
"gremlin-groovy"
);
Bindings
bindings
=
engine
.
createBindings
();
bindings
.
put
(
"g"
,
getGraph
());
//Do not cache script compilations due to memory implications
engine
.
getContext
().
setAttribute
(
"#jsr223.groovy.engine.keep.globals"
,
"phantom"
,
ScriptContext
.
ENGINE_SCOPE
);
Object
result
=
engine
.
eval
(
gremlinQuery
,
bindings
);
return
result
;
}
...
...
release-log.txt
View file @
c91f582a
...
...
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES:
ATLAS-1342 Titan Solrclient - Add timeouts for zookeeper connect and session (sumasai)
ATLAS-1353 Invalid error message(500 internal server error) for lineage query on non-existing table. (sumasai)
ATLAS-1347 Creating a class with unknown supertype results in "409 Conflict", where as expected is "400 Bad Message" (apoorvnairk via sumasai)
ATLAS-737 Add DSL support for Sum, Max, Min and count operations with and without group by (guptaneeru via dkantor)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment