atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shweth...@apache.org
Subject [06/12] incubator-atlas git commit: ATLAS-950 Atlas should support Solr that requires Kerberos authentication (madhan.neethiraj via yhemanth)
Date Wed, 29 Jun 2016 08:37:52 GMT
ATLAS-950 Atlas should support Solr that requires Kerberos authentication (madhan.neethiraj
via yhemanth)


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/88fb8a11
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/88fb8a11
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/88fb8a11

Branch: refs/heads/0.7-incubating
Commit: 88fb8a115ffa0b359fc674a642ee50f73bab18d9
Parents: 40cccc3
Author: Shwetha GS <sshivalingamurthy@hortonworks.com>
Authored: Wed Jun 29 12:10:47 2016 +0530
Committer: Shwetha GS <sshivalingamurthy@hortonworks.com>
Committed: Wed Jun 29 12:10:47 2016 +0530

----------------------------------------------------------------------
 pom.xml                                               |  2 +-
 release-log.txt                                       |  1 +
 titan/pom.xml                                         |  4 +++-
 .../titan/diskstorage/solr/Solr5Index.java            | 14 ++++++++------
 4 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/88fb8a11/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5f76666..7de052f 100755
--- a/pom.xml
+++ b/pom.xml
@@ -370,7 +370,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>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/88fb8a11/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index b4e8fc5..c011928 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -31,6 +31,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file
(dosset
 ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via
shwethags)
 
 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)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/88fb8a11/titan/pom.xml
----------------------------------------------------------------------
diff --git a/titan/pom.xml b/titan/pom.xml
index ab2b6f6..a27bba5 100644
--- a/titan/pom.xml
+++ b/titan/pom.xml
@@ -49,11 +49,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>
@@ -102,4 +104,4 @@
     </build>
 
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/88fb8a11/titan/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
----------------------------------------------------------------------
diff --git a/titan/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
b/titan/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
index f756a4a..3b5620c 100644
--- a/titan/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
+++ b/titan/src/main/java/com/thinkaurelius/titan/diskstorage/solr/Solr5Index.java
@@ -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;


Mime
View raw message