Java 类org.apache.lucene.index.MergePolicy.OneMerge 实例源码

项目:search    文件:TestMergeSchedulerExternal.java   
@Override
protected MergeThread getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException {
  MergeThread thread = new MyMergeThread(writer, merge);
  thread.setThreadPriority(getMergeThreadPriority());
  thread.setDaemon(true);
  thread.setName("MyMergeThread");
  return thread;
}
项目:NYBC    文件:TestMergeSchedulerExternal.java   
@Override
protected MergeThread getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException {
  MergeThread thread = new MyMergeThread(writer, merge);
  thread.setThreadPriority(getMergeThreadPriority());
  thread.setDaemon(true);
  thread.setName("MyMergeThread");
  return thread;
}
项目:incubator-blur    文件:SharedMergeScheduler.java   
MergeStatus(OneMerge oneMerge, Directory directory, long size, List<SegmentInfoPerCommit> segments) {
  _id = UUID.randomUUID().toString();
  _directory = directory;
  _start = System.nanoTime();
  _size = size;
  _oneMerge = oneMerge;
  _segments = segments;
}
项目:incubator-blur    文件:SharedMergeScheduler.java   
private void addMerge(String id, IndexWriter writer, OneMerge merge) throws IOException {
  MergeWork mergeWork = new MergeWork(id, merge, writer);
  if (isLargeMerge(merge)) {
    _largeMergeQueue.add(mergeWork);
  } else {
    _smallMergeQueue.add(mergeWork);
  }
}
项目:incubator-blur    文件:SharedMergeScheduler.java   
private boolean isLargeMerge(OneMerge merge) throws IOException {
  long totalBytesSize = merge.totalBytesSize();
  if (totalBytesSize <= _smallMergeThreshold) {
    return false;
  }
  return true;
}
项目:incubator-blur    文件:SharedMergeScheduler.java   
protected static SegmentInfo getSegmentInfo(OneMerge oneMerge) {
  Object segmentInfoPerCommit = getFieldObject(oneMerge, "info");
  if (segmentInfoPerCommit == null) {
    return null;
  }
  return (SegmentInfo) getFieldObject(segmentInfoPerCommit, "info");
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestMergeSchedulerExternal.java   
@Override
protected MergeThread getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException {
  MergeThread thread = new MyMergeThread(writer, merge);
  thread.setThreadPriority(getMergeThreadPriority());
  thread.setDaemon(true);
  thread.setName("MyMergeThread");
  return thread;
}
项目:search    文件:TestMergeSchedulerExternal.java   
public MyMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) {
  super(writer, merge);
  mergeThreadCreated = true;
}
项目:search    文件:TestMergeSchedulerExternal.java   
@Override
protected void doMerge(MergePolicy.OneMerge merge) throws IOException {
  mergeCalled = true;
  super.doMerge(merge);
}
项目:NYBC    文件:TestMergeSchedulerExternal.java   
public MyMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) {
  super(writer, merge);
  mergeThreadCreated = true;
}
项目:NYBC    文件:TestMergeSchedulerExternal.java   
@Override
protected void doMerge(MergePolicy.OneMerge merge) throws IOException {
  mergeCalled = true;
  super.doMerge(merge);
}
项目:incubator-blur    文件:SharedMergeScheduler.java   
public MergeWork(String id, OneMerge merge, IndexWriter writer) throws IOException {
  _id = id;
  _merge = merge;
  _writer = writer;
  _size = merge.totalBytesSize();
}
项目:incubator-blur    文件:SharedMergeScheduler.java   
protected void addMerges(String id, IndexWriter writer) throws IOException {
  OneMerge merge;
  while ((merge = writer.getNextMerge()) != null) {
    addMerge(id, writer, merge);
  }
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestMergeSchedulerExternal.java   
public MyMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) {
  super(writer, merge);
  mergeThreadCreated = true;
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestMergeSchedulerExternal.java   
@Override
protected void doMerge(MergePolicy.OneMerge merge) throws IOException {
  mergeCalled = true;
  super.doMerge(merge);
}