Tabnine Logo
ConcurrentMergeScheduler.mergeThreadCount
Code IndexAdd Tabnine to your IDE (free)

How to use
mergeThreadCount
method
in
org.apache.lucene.index.ConcurrentMergeScheduler

Best Java code snippets using org.apache.lucene.index.ConcurrentMergeScheduler.mergeThreadCount (Showing top 12 results out of 315)

origin: org.apache.lucene/lucene-core

while (writer.hasPendingMerges() && mergeThreadCount() >= maxMergeCount) {
origin: org.apache.lucene/com.springsource.org.apache.lucene

/** Return the priority that merge threads run at. */
public synchronized void setMergeThreadPriority(int pri) {
 if (pri > Thread.MAX_PRIORITY || pri < Thread.MIN_PRIORITY)
  throw new IllegalArgumentException("priority must be in range " + Thread.MIN_PRIORITY + " .. " + Thread.MAX_PRIORITY + " inclusive");
 mergeThreadPriority = pri;
 final int numThreads = mergeThreadCount();
 for(int i=0;i<numThreads;i++) {
  MergeThread merge = (MergeThread) mergeThreads.get(i);
  merge.setThreadPriority(pri);
 }
}
origin: org.apache.lucene/lucene-core-jfrog

/** Return the priority that merge threads run at. */
public synchronized void setMergeThreadPriority(int pri) {
 if (pri > Thread.MAX_PRIORITY || pri < Thread.MIN_PRIORITY)
  throw new IllegalArgumentException("priority must be in range " + Thread.MIN_PRIORITY + " .. " + Thread.MAX_PRIORITY + " inclusive");
 mergeThreadPriority = pri;
 final int numThreads = mergeThreadCount();
 for(int i=0;i<numThreads;i++) {
  MergeThread merge = (MergeThread) mergeThreads.get(i);
  merge.setThreadPriority(pri);
 }
}
origin: org.apache.lucene/com.springsource.org.apache.lucene

/** Used for testing */
private void addMyself() {
 synchronized(allInstances) {
  final int size=0;
  int upto = 0;
  for(int i=0;i<size;i++) {
   final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
   if (!(other.closed && 0 == other.mergeThreadCount()))
    // Keep this one for now: it still has threads or
    // may spawn new threads
    allInstances.set(upto++, other);
  }
  allInstances.subList(upto, allInstances.size()).clear();
  allInstances.add(this);
 }
}
origin: org.apache.lucene/lucene-core-jfrog

/** Used for testing */
private void addMyself() {
 synchronized(allInstances) {
  final int size=0;
  int upto = 0;
  for(int i=0;i<size;i++) {
   final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
   if (!(other.closed && 0 == other.mergeThreadCount()))
    // Keep this one for now: it still has threads or
    // may spawn new threads
    allInstances.set(upto++, other);
  }
  allInstances.subList(upto, allInstances.size()).clear();
  allInstances.add(this);
 }
}
origin: org.apache.lucene/com.springsource.org.apache.lucene

public synchronized void sync() {
 while(mergeThreadCount() > 0) {
  message("now wait for threads; currently " + mergeThreads.size() + " still running");
  final int count = mergeThreads.size();
  for(int i=0;i<count;i++)
   message("    " + i + ": " + ((MergeThread) mergeThreads.get(i)));
  try {
   wait();
  } catch (InterruptedException e) {
  }
 }
}
private synchronized int mergeThreadCount() {
origin: org.apache.lucene/lucene-core-jfrog

public synchronized void sync() {
 while(mergeThreadCount() > 0) {
  message("now wait for threads; currently " + mergeThreads.size() + " still running");
  final int count = mergeThreads.size();
  for(int i=0;i<count;i++)
   message("    " + i + ": " + ((MergeThread) mergeThreads.get(i)));
  try {
   wait();
  } catch (InterruptedException e) {
  }
 }
}
private synchronized int mergeThreadCount() {
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

while (writer.hasPendingMerges() && mergeThreadCount() >= maxMergeCount) {
origin: org.infinispan/infinispan-embedded-query

while (writer.hasPendingMerges() && mergeThreadCount() >= maxMergeCount) {
origin: harbby/presto-connectors

while (writer.hasPendingMerges() && mergeThreadCount() >= maxMergeCount) {
origin: org.apache.lucene/lucene-core-jfrog

while (mergeThreadCount() >= maxThreadCount) {
 message("    too many merge threads running; stalling...");
 try {
assert mergeThreadCount() < maxThreadCount;
origin: org.apache.lucene/com.springsource.org.apache.lucene

while (mergeThreadCount() >= maxThreadCount) {
 message("    too many merge threads running; stalling...");
 try {
assert mergeThreadCount() < maxThreadCount;
org.apache.lucene.indexConcurrentMergeSchedulermergeThreadCount

Javadoc

How many MergeThreads have kicked off (this is use to name them).

Popular methods of ConcurrentMergeScheduler

  • <init>
    Sole constructor, with all settings set to default values.
  • doMerge
    Does the actual merge, by calling IndexWriter#merge
  • getMergeThread
    Create and return a new MergeThread
  • handleMergeException
    Called when an exception is hit in a background merge thread
  • message
  • sync
    Wait for any running merge threads to finish. This call is not interruptible as used by #close().
  • setDefaultMaxMergesAndThreads
    Sets max merges and threads to proper defaults for rotational or non-rotational storage.
  • bytesToMB
  • doStall
    Called from #maybeStall to pause the calling thread for a bit.
  • initDynamicDefaults
  • isBacklog
  • maybeStall
    This is invoked by #merge to possibly stall the incoming thread when there are too many merges runni
  • isBacklog,
  • maybeStall,
  • merge,
  • nsToSec,
  • rateToString,
  • removeMergeThread,
  • setMaxMergesAndThreads,
  • targetMBPerSecChanged,
  • updateIOThrottle

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now