[
https://issues.apache.org/jira/browse/STORM-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14695488#comment-14695488
]
ASF GitHub Bot commented on STORM-851:
--------------------------------------
Github user harshach commented on a diff in the pull request:
https://github.com/apache/storm/pull/665#discussion_r36993719
--- Diff:
external/storm-solr/src/main/java/org/apache/storm/solr/schema/builder/RestJsonSchemaBuilder.java
---
@@ -0,0 +1,53 @@
+package org.apache.storm.solr.schema.builder;
+
+import com.google.gson.Gson;
+import org.apache.storm.solr.schema.Schema;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Scanner;
+
+/**
+ * Class that buils the {@link Schema} object from the JSON representation
of the schema as returned by the
+ * URL of the form http://localhost:8983/solr/gettingstarted/schema/ .
This particular URL returns the schema
+ * in JSON format for the gettingstarted example running locally.
+ * <p></p>
+ * Created by hlouro on 7/28/15.
+ */
+public class RestJsonSchemaBuilder implements SchemaBuilder {
+ private static final Logger logger =
LoggerFactory.getLogger(RestJsonSchemaBuilder.class);
+ private Schema schema;
+
+
+ /** Urls with the form
http://localhost:8983/solr/gettingstarted/schema/ returns the schema in JSON
format */
+ public RestJsonSchemaBuilder(String solrHost, String solrPort, String
collection) throws IOException {
+ this(new URL("http://" + solrHost + ":" + solrPort + "/solr/" +
collection + "/schema/"));
--- End diff --
Does solr gives config options to rename "/solr/" part and also "/schema/"
If so we shouldn't be hard coding those here instead give as an option with
defaults.
> Storm Solr connector
> --------------------
>
> Key: STORM-851
> URL: https://issues.apache.org/jira/browse/STORM-851
> Project: Apache Storm
> Issue Type: Improvement
> Reporter: Sriharsha Chintalapani
> Assignee: Hugo Louro
>
> Storm solr connector should provide bolt and trident implementation to allow
> users to index data coming through the topology into solr.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)