예제 #1
0
        private void ConfigureElasticSearch()
        {
            try
            {
                // Initializing RunES
                _elastic = new RunES();

                string workerIPs = ListWorkerRoles();
                Trace.TraceInformation("OnStart workerIPs: " + workerIPs);
                // Calling StartTomcat method to start the tomcat process
                // RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["ElasticSearch"].IPEndpoint.Port.ToString()

                var path = RoleEnvironment.GetLocalResource("ESLocation").RootPath;
                Trace.TraceInformation("OnStart ESLocation: " + path);
                _process = _elastic.StartES(RoleEnvironment.GetLocalResource("ESLocation").RootPath, "9200", workerIPs);
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.Message + " " + ex.StackTrace);
                Trace.Flush();
                throw;
            }
        }
예제 #2
0
        private void ConfigureElasticSearch()
        {
            try
            {
                // Initializing RunES
                _elastic = new RunES();

                string workerIPs = ListWorkerRoles();
                Trace.TraceInformation("OnStart workerIPs: " + workerIPs);
                // Calling StartTomcat method to start the tomcat process
                // RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["ElasticSearch"].IPEndpoint.Port.ToString()

                var path = RoleEnvironment.GetLocalResource("ESLocation").RootPath;
                Trace.TraceInformation("OnStart ESLocation: " + path);
                _process = _elastic.StartES(RoleEnvironment.GetLocalResource("ESLocation").RootPath, "9200", workerIPs);
            }
            catch (Exception ex)
            {
                Trace.TraceError(ex.Message + " " + ex.StackTrace);
                Trace.Flush();
                throw;
            }
        }