Github user harshach commented on a diff in the pull request: https://github.com/apache/storm/pull/665#discussion_r37147769 --- 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 -- my bad overlooked the constructor with url this should be enough.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---