Runs the specified SearchBiosamplesRequest.
960006
def runSearchBiosamples(self, request):
        
        return self.runSearchRequest(
            request, protocol.SearchBiosamplesRequest,
            protocol.SearchBiosamplesResponse,
            self.biosamplesGenerator)
77688
def Run(self, request):
    """"""

    self.request = request
    filters = self.BuildChecks(request)

    files_checked = 0
    for f in self.ListDirectory(request.pathspec):
      self.Progress()

      # Ignore this file if any of the checks fail.
      if not any((check(f) for check in filters)):
        self.SendReply(f)

      files_checked += 1
      if files_checked >= self.MAX_FILES_TO_CHECK:
        return
1303295
def execute(self, limitRequest=350000, limitResMax=-1):
        """"""
        query = self.getQueries()
        query  = self.__buildLimit(query, limitResMax)
        nbr_results = limitResMax
        if (limitResMax == -1):
            query.setBaseUrl(self.__url+'/count')
            countUrl = query.getUrl()            
            result_count = Util.retrieveJsonResponseFromServer(countUrl)    
            nbr_results=result_count['total']
        else:
            nbr_results = limitResMax
        resultSearch = []
        if nbr_results < limitRequest :            
            query.setBaseUrl(self.__url+'/records')
            url = query.getUrl()
            startVal = query._getParameters()['start']
            while (nbr_results-startVal)>0 :#Do the job per 300 items till nbr_result is reached                
                resultTemp = Util.retrieveJsonResponseFromServer(url)
                resultSearch.extend(self.__parseResponse(resultTemp))
                parameters = query._getParameters()                
                startVal = parameters['start'] + parameters['limit']
                query = UpdateParameter(query, 'start', startVal) 
                query.setBaseUrl(self.__url+'/records')
		url=query.getUrl()            
        else:
            out_mess="Not allowed\nNbr results (%d) exceeds limit_request param: %d\n" % (nbr_results, limitRequest)
            self.__logger.info(out_mess)        
        return resultSearch
287214
def runSearchVariantSets(self, request):
        
        return self.runSearchRequest(
            request, protocol.SearchVariantSetsRequest,
            protocol.SearchVariantSetsResponse,
            self.variantSetsGenerator)
115256
public void run() {

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINER)) {
            logger.logp(Level.FINER, CLASS_NAME, "run", "enter");
        }

        String docRoot = null, threadParam = null;

        Container container = webapp.getModuleContainer();
        if (container != null) {
            hasContainer = true;
        } else {
            docRoot = webapp.getRealPath("/");
        }
        /*
         * First we gather information about the webapp and the parameters that
         * were specified.
         */
        //appName = webapp.getWebAppName();
        appName = webapp.getWebAppConfig().getApplicationName();

        //Get the maximum length of the files that we will only compile.... the rest are also classloaded
        _minLength = options.getPrepareJSPs() * 1024;

        if (options.getPrepareJSPsClassloadChanged() != null) {
            onlyCLChanged = true;
            _startAt = Constants.PREPARE_JSPS_DEFAULT_STARTAT;
        } else {
            _startAt = options.getPrepareJSPsClassload();
        }

        _threads = options.getPrepareJSPThreadCount();

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()) {
            logger.logp(Level.INFO, CLASS_NAME, "run", "PrepareJspHelper executing on application [" + this.appName + "]");
        }

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, CLASS_NAME, "run", "PrepareJspHelper: Document Root: " + docRoot);
            logger.logp(Level.FINE, CLASS_NAME, "run", "PrepareJspHelper: File size minimum (in bytes): " + _minLength);
            logger.logp(Level.FINE, CLASS_NAME, "run", "PrepareJspHelper: Number of threads: " + _threads);

            if (onlyCLChanged) {
                logger.logp(Level.FINE, CLASS_NAME, "run", "PrepareJspHelper: Only classloading out-of-date (changed) JSPs.");
            } else {
                logger.logp(Level.FINE, CLASS_NAME, "run", "PrepareJspHelper: Classloading JSPs starting at JSP number " + _startAt);
            }

        }

        if (container != null) {
            createListOfEntries(container);
        }

        //Create worker threads and let them start compiling.
        try {
            Thread[] threads = new Thread[_threads];
            int i;
            for (i = 0; i < _threads; i++) {
                PrepareJspHelperThread helper = new PrepareJspHelperThread(this, docRoot, container);
                threads[i] = new Thread(helper, "PrepareJspHelperThread " + i);
                threads[i].setDaemon(true);
                threads[i].start();
            }
            //now lets wait for all the threads to die.
            for (i = 0; i < _threads; i++) {
                try {
                    threads[i].join();
                } catch (Throwable th) {
                    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.WARNING)) {
                        logger.logp(Level.WARNING, CLASS_NAME, "run", "Pretouch Thread died during execution.", th);
                    }
                }
            }
        } catch (Exception ex) {
            logger.logp(Level.WARNING, CLASS_NAME, "run", "Unexpected exception while running pretouch.", ex);
        }

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.INFO)) {
            logger.logp(Level.INFO, CLASS_NAME, "run", "PrepareJspHelper in group [" + appName + "]: All " + _counter + " jsp files have been processed.");
        }

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINER)) {
            logger.logp(Level.FINER, CLASS_NAME, "run", "< run");
        }
    }
887020
def run(self):
        
        with self.input().open() as handle:
            body = json.loads(handle.read())
        es = elasticsearch.Elasticsearch()
        id = body.get('_id')
        es.index(index='frontpage', doc_type='html', id=id, body=body)
331229
@Override
  public int run() throws IOException {
    Preconditions.checkArgument(samplePaths != null && !samplePaths.isEmpty(),
        "Sample JSON path is required");
    Preconditions.checkArgument(samplePaths.size() == 1,
        "Only one JSON sample can be given");

    // assume fields are nullable by default, users can easily change this
    Schema sampleSchema = JsonUtil.inferSchema(
        open(samplePaths.get(0)), recordName, numRecords);

    if (sampleSchema != null) {
      output(sampleSchema.toString(!minimize), console, outputPath);
      return 0;
    } else {
      console.error("Sample file did not contain any records");
      return 1;
    }
  }
871919
def run(self):
    """"""
    while not self._abort:
      hashes = self._GetHashes(self._hash_queue, self.hashes_per_batch)
      if hashes:
        time_before_analysis = time.time()
        hash_analyses = self.Analyze(hashes)
        current_time = time.time()
        self.seconds_spent_analyzing += current_time - time_before_analysis
        self.analyses_performed += 1
        for hash_analysis in hash_analyses:
          self._hash_analysis_queue.put(hash_analysis)
          self._hash_queue.task_done()
        time.sleep(self.wait_after_analysis)
      else:
        # Wait for some more hashes to be added to the queue.
        time.sleep(self.EMPTY_QUEUE_WAIT_TIME)
1213621
def runSearchVariantAnnotationSets(self, request):
        
        return self.runSearchRequest(
            request, protocol.SearchVariantAnnotationSetsRequest,
            protocol.SearchVariantAnnotationSetsResponse,
            self.variantAnnotationSetsGenerator)
929533
def run():
    
    args = parse_args()

    if args.verbose:
        log_level = logging.DEBUG
    else:
        log_level = logging.INFO
    logging.basicConfig(
        level=log_level,
        format='%(asctime)s %(levelname)s %(name)s: %(message)s')
    if not args.verbose:
        # Manage third-party loggers
        req_logger = logging.getLogger('requests')
        req_logger.setLevel(logging.WARNING)

    logger = logging.getLogger(__name__)

    logger.info('refresh-lsst-bib version {}'.format(__version__))

    error_count = process_bib_files(args.dir)

    sys.exit(error_count)
370760
@Override
    public void run() {
        try {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){  
                Tr.debug(tc, "Run WriteListenerRunnable start , current thread -->" + Thread.currentThread().getName());
            }
            // clean up everything on this thread
            WebContainerRequestState reqState = WebContainerRequestState.getInstance(false);
            if (reqState != null) {
                reqState.init();
            }
            // Push the original thread's context onto the current thread, also
            // save off the current thread's context
            _tcm.pushContextData();

            // call onWritePossible
            synchronized (this._out) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){  
                    Tr.debug(tc, "Invoking the onWritePossible first time");
                }
                WebContainerRequestState.getInstance(true).setAttribute("com.ibm.ws.webcontainer.upgrade.WriteAllowedonThisThread", true);
                this._listener.onWritePossible();

            }
        } catch (Exception e) {
            // If any other exception is thrown then call error which will set
            // exception from error which will allow application to write error
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){  
                Tr.debug(tc, "An exception occurred during the onWritePossible : " + e);
            }
            _cb.error(_out.getBufferHelper().get_vc(), e);

        } finally {
            // Revert back to the thread's current context
            _tcm.popContextData();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){  
                Tr.debug(tc, "Run WriteListenerRunnable done");
            }
        }
    }
1098992
def run(self):
        """"""
        if ProfileCollection and isinstance(self.mloginfo.logfile,
                                            ProfileCollection):
            print("\n    not available for system.profile collections\n")
            return

        for version, logevent in self.mloginfo.logfile.restarts:
            print("   %s version %s"
                  % (logevent.datetime.strftime("%b %d %H:%M:%S"), version))

        if len(self.mloginfo.logfile.restarts) == 0:
            print("  no restarts found")
787928
@Override
	public void run() {
		while (running) {
			try {
				// Read the request
				service.execute(new HttpSession(this, socket.accept()));
			} catch (IOException e) {
				// Ignore mostly.
			}
		}
	}
985102
def Run(self, arg):
    """"""
    if arg is None:
      arg = rdf_client_action.GetClientStatsRequest()

    proc = psutil.Process(os.getpid())
    meminfo = proc.memory_info()
    boot_time = rdfvalue.RDFDatetime.FromSecondsSinceEpoch(psutil.boot_time())
    create_time = rdfvalue.RDFDatetime.FromSecondsSinceEpoch(proc.create_time())
    stats_collector = stats_collector_instance.Get()
    response = rdf_client_stats.ClientStats(
        RSS_size=meminfo.rss,
        VMS_size=meminfo.vms,
        memory_percent=proc.memory_percent(),
        bytes_received=stats_collector.GetMetricValue(
            "grr_client_received_bytes"),
        bytes_sent=stats_collector.GetMetricValue("grr_client_sent_bytes"),
        create_time=create_time,
        boot_time=boot_time)

    response.cpu_samples = self.grr_worker.stats_collector.CpuSamplesBetween(
        start_time=arg.start_time, end_time=arg.end_time)
    response.io_samples = self.grr_worker.stats_collector.IOSamplesBetween(
        start_time=arg.start_time, end_time=arg.end_time)

    self.Send(response)
1180477
def runSearchReferences(self, request):
        
        return self.runSearchRequest(
            request, protocol.SearchReferencesRequest,
            protocol.SearchReferencesResponse,
            self.referencesGenerator)
261863
def run(self):
        """"""
        (task_id, tasks) = self.server.get_task()
        self.task_store.from_dict(tasks)
        for (index, task) in self.task_store:
            result = self.compute(index, task)
            self.results.append(result)
        self.server.task_done((task_id, self.results))
1327409
def runListPeers(self, request):
        
        return self.runSearchRequest(
            request,
            protocol.ListPeersRequest,
            protocol.ListPeersResponse,
            self.peersGenerator)