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
2692f476
Commit
2692f476
authored
Jun 27, 2016
by
Hemanth Yamijala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-950 Atlas should support Solr that requires Kerberos authentication…
ATLAS-950 Atlas should support Solr that requires Kerberos authentication (madhan.neethiraj via yhemanth)
parent
202893a9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
pom.xml
pom.xml
+1
-1
release-log.txt
release-log.txt
+1
-0
pom.xml
titan/pom.xml
+3
-2
Solr5Index.java
.../com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
+8
-6
No files found.
pom.xml
View file @
2692f476
...
...
@@ -368,7 +368,7 @@
<titan.version>
0.5.4
</titan.version>
<hadoop.version>
2.7.0
</hadoop.version>
<hbase.version>
1.1.2
</hbase.version>
<solr.version>
5.
1.0
</solr.version>
<solr.version>
5.
5.1
</solr.version>
<kafka.version>
0.10.0.0
</kafka.version>
<!-- scala versions -->
<scala.version>
2.10.4
</scala.version>
...
...
release-log.txt
View file @
2692f476
...
...
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES:
ATLAS-950 Atlas should support Solr that requires Kerberos authentication (madhan.neethiraj via yhemanth)
ATLAS-947 Return state information in inputs and outputs lineage API (shwethags)
ATLAS-806 Create default taxonomy at server startup (jspeidel via yhemanth)
ATLAS-942 Jenkins build failure - GraphRepoMapperScaleTest (shwethags)
...
...
titan/pom.xml
View file @
2692f476
...
...
@@ -47,11 +47,13 @@
<dependency>
<groupId>
org.apache.solr
</groupId>
<artifactId>
solr-core
</artifactId>
<version>
${solr.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.solr
</groupId>
<artifactId>
solr-solrj
</artifactId>
<version>
${solr.version}
</version>
</dependency>
<dependency>
...
...
@@ -100,4 +102,4 @@
</build>
</project>
\ No newline at end of file
</project>
titan/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
View file @
2692f476
...
...
@@ -60,6 +60,7 @@ import org.apache.solr.client.solrj.SolrServerException;
import
org.apache.solr.client.solrj.impl.CloudSolrClient
;
import
org.apache.solr.client.solrj.impl.HttpClientUtil
;
import
org.apache.solr.client.solrj.impl.HttpSolrClient
;
import
org.apache.solr.client.solrj.impl.Krb5HttpClientConfigurer
;
import
org.apache.solr.client.solrj.impl.LBHttpSolrClient
;
import
org.apache.solr.client.solrj.request.CollectionAdminRequest
;
import
org.apache.solr.client.solrj.request.UpdateRequest
;
...
...
@@ -206,11 +207,13 @@ public class Solr5Index implements IndexProvider {
waitSearcher
=
config
.
get
(
WAIT_SEARCHER
);
if
(
mode
==
Mode
.
CLOUD
)
{
HttpClientUtil
.
setConfigurer
(
new
Krb5HttpClientConfigurer
());
String
zookeeperUrl
=
config
.
get
(
Solr5Index
.
ZOOKEEPER_URL
);
CloudSolrClient
cloudServer
=
new
CloudSolrClient
(
zookeeperUrl
,
true
);
cloudServer
.
connect
();
solrClient
=
cloudServer
;
}
else
if
(
mode
==
Mode
.
HTTP
)
{
HttpClientUtil
.
setConfigurer
(
new
Krb5HttpClientConfigurer
());
HttpClient
clientParams
=
HttpClientUtil
.
createClient
(
new
ModifiableSolrParams
()
{{
add
(
HttpClientUtil
.
PROP_ALLOW_COMPRESSION
,
config
.
get
(
HTTP_ALLOW_COMPRESSION
).
toString
());
add
(
HttpClientUtil
.
PROP_CONNECTION_TIMEOUT
,
config
.
get
(
HTTP_CONNECTION_TIMEOUT
).
toString
());
...
...
@@ -756,7 +759,7 @@ public class Solr5Index implements IndexProvider {
if
(
mode
!=
Mode
.
CLOUD
)
throw
new
UnsupportedOperationException
(
"Operation only supported for SolrCloud"
);
logger
.
debug
(
"Clearing storage from Solr: {}"
,
solrClient
);
ZkStateReader
zkStateReader
=
((
CloudSolrClient
)
solrClient
).
getZkStateReader
();
zkStateReader
.
updateClusterState
(
true
);
zkStateReader
.
updateClusterState
();
ClusterState
clusterState
=
zkStateReader
.
getClusterState
();
for
(
String
collection
:
clusterState
.
getCollections
())
{
logger
.
debug
(
"Clearing collection [{}] in Solr"
,
collection
);
...
...
@@ -911,7 +914,7 @@ public class Solr5Index implements IndexProvider {
*/
private
static
boolean
checkIfCollectionExists
(
CloudSolrClient
server
,
String
collection
)
throws
KeeperException
,
InterruptedException
{
ZkStateReader
zkStateReader
=
server
.
getZkStateReader
();
zkStateReader
.
updateClusterState
(
true
);
zkStateReader
.
updateClusterState
();
ClusterState
clusterState
=
zkStateReader
.
getClusterState
();
return
clusterState
.
getCollectionOrNull
(
collection
)
!=
null
;
}
...
...
@@ -926,7 +929,7 @@ public class Solr5Index implements IndexProvider {
while
(
cont
)
{
boolean
sawLiveRecovering
=
false
;
zkStateReader
.
updateClusterState
(
true
);
zkStateReader
.
updateClusterState
();
ClusterState
clusterState
=
zkStateReader
.
getClusterState
();
Map
<
String
,
Slice
>
slices
=
clusterState
.
getSlicesMap
(
collection
);
Preconditions
.
checkNotNull
(
"Could not find collection:"
+
collection
,
slices
);
...
...
@@ -935,9 +938,8 @@ public class Solr5Index implements IndexProvider {
Map
<
String
,
Replica
>
shards
=
entry
.
getValue
().
getReplicasMap
();
for
(
Map
.
Entry
<
String
,
Replica
>
shard
:
shards
.
entrySet
())
{
String
state
=
shard
.
getValue
().
getStr
(
ZkStateReader
.
STATE_PROP
);
if
((
state
.
equals
(
ZkStateReader
.
RECOVERING
)
||
state
.
equals
(
ZkStateReader
.
SYNC
)
||
state
.
equals
(
ZkStateReader
.
DOWN
))
if
((
state
.
equals
(
Replica
.
State
.
RECOVERING
)
||
state
.
equals
(
Replica
.
State
.
DOWN
))
&&
clusterState
.
liveNodesContain
(
shard
.
getValue
().
getStr
(
ZkStateReader
.
NODE_NAME_PROP
)))
{
sawLiveRecovering
=
true
;
...
...
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