Package org.openstreetmap.osmosis.plugin.elasticsearch.utils

Examples of org.openstreetmap.osmosis.plugin.elasticsearch.utils.Parameters


  private EntityDao entityDao;

  @Before
  public void setUp() throws IOException {
    entityDao = new EntityDao(INDEX_NAME, client());
    Parameters params = new Parameters.Builder().loadResource("plugin.properties").build();
    IndexAdminService indexAdminService = new IndexAdminService(client());
    HashMap<String, String> mappings = new HashMap<String, String>();
    mappings.put(ESEntityType.NODE.getIndiceName(), params.getProperty(Parameters.INDEX_MAPPING_NODE));
    mappings.put(ESEntityType.WAY.getIndiceName(), params.getProperty(Parameters.INDEX_MAPPING_WAY));
    indexAdminService.createIndex(INDEX_NAME, 1, 0, mappings);
  }
View Full Code Here


public class ElasticSearchWriterFactory extends TaskManagerFactory {

  @Override
  protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) {
    // Retrieve parameters
    Parameters params = buildPluginParameters(taskConfig);
    // Build ElasticSearch client
    Client client = buildElasticsearchClient(params);
    // Build indexAdminService
    IndexAdminService indexAdminService = new IndexAdminService(client);
    // Build EntityDao
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.plugin.elasticsearch.utils.Parameters

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.