mirror of https://github.com/apache/lucene.git
turn off debug prints; add lucene.experimental to javadocs
This commit is contained in:
parent
c03bb2ecf9
commit
88fea23176
|
@ -485,7 +485,7 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentCommitInfo
|
|||
out.writeVInt(Version.LATEST.major);
|
||||
out.writeVInt(Version.LATEST.minor);
|
||||
out.writeVInt(Version.LATEST.bugfix);
|
||||
System.out.println(Thread.currentThread().getName() + ": now write " + out.getName() + " with version=" + version);
|
||||
//System.out.println(Thread.currentThread().getName() + ": now write " + out.getName() + " with version=" + version);
|
||||
|
||||
out.writeLong(version);
|
||||
out.writeInt(counter); // write counter
|
||||
|
|
|
@ -30,8 +30,9 @@ import org.apache.lucene.index.CorruptIndexException;
|
|||
import org.apache.lucene.util.IOUtils;
|
||||
|
||||
/** Handles copying one set of files, e.g. all files for a new NRT point, or files for pre-copying a merged segment.
|
||||
* This notifies the caller via OnceDone when the job finishes or failed. */
|
||||
|
||||
* This notifies the caller via OnceDone when the job finishes or failed.
|
||||
*
|
||||
* @lucene.experimental */
|
||||
public abstract class CopyJob implements Comparable<CopyJob> {
|
||||
private final static AtomicLong counter = new AtomicLong();
|
||||
protected final ReplicaNode dest;
|
||||
|
|
|
@ -24,7 +24,9 @@ import java.util.Set;
|
|||
import org.apache.lucene.index.SegmentInfos;
|
||||
import org.apache.lucene.store.Directory;
|
||||
|
||||
/** Holds incRef'd file level details for one point-in-time segment infos on the primary node. */
|
||||
/** Holds incRef'd file level details for one point-in-time segment infos on the primary node.
|
||||
*
|
||||
* @lucene.experimental */
|
||||
public class CopyState {
|
||||
|
||||
public final Map<String,FileMetaData> files;
|
||||
|
|
|
@ -17,7 +17,9 @@ package org.apache.lucene.replicator.nrt;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** Holds metadata details about a single file that we use to confirm two files (one remote, one local) are in fact "identical". */
|
||||
/** Holds metadata details about a single file that we use to confirm two files (one remote, one local) are in fact "identical".
|
||||
*
|
||||
* @lucene.experimental */
|
||||
|
||||
class FileMetaData {
|
||||
|
||||
|
|
|
@ -44,7 +44,9 @@ import org.apache.lucene.store.IndexInput;
|
|||
import org.apache.lucene.store.RAMOutputStream;
|
||||
import org.apache.lucene.util.StringHelper;
|
||||
|
||||
/** Common base class for {@link PrimaryNode} and {@link ReplicaNode}. */
|
||||
/** Common base class for {@link PrimaryNode} and {@link ReplicaNode}.
|
||||
*
|
||||
* @lucene.experimental */
|
||||
|
||||
abstract class Node implements Closeable {
|
||||
|
||||
|
|
|
@ -17,6 +17,12 @@ package org.apache.lucene.replicator.nrt;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Should be thrown by subclasses of {@link PrimaryNode} and {@link ReplicaNode} if a non-fatal exception
|
||||
* occurred while communicating between nodes.
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
public class NodeCommunicationException extends RuntimeException {
|
||||
public NodeCommunicationException(String when, Throwable cause) {
|
||||
super(when);
|
||||
|
|
|
@ -46,7 +46,10 @@ import org.apache.lucene.util.ThreadInterruptedException;
|
|||
* replicas since step 2) could otherwise be done concurrently with replicas copying files over.
|
||||
*/
|
||||
|
||||
/** Node that holds an IndexWriter, indexing documents into its local index. */
|
||||
/** Node that holds an IndexWriter, indexing documents into its local index.
|
||||
*
|
||||
* @lucene.experimental */
|
||||
|
||||
public abstract class PrimaryNode extends Node {
|
||||
|
||||
// Current NRT segment infos, incRef'd with IndexWriter.deleter:
|
||||
|
|
|
@ -34,8 +34,6 @@ import org.apache.lucene.store.IOContext;
|
|||
|
||||
// TODO: can we factor/share with IFD: this is doing exactly the same thing, but on the replica side
|
||||
|
||||
// TODO: once LUCENE-6835 is in, this class becomes a lot simpler?
|
||||
|
||||
class ReplicaFileDeleter {
|
||||
private final Map<String,Integer> refCounts = new HashMap<String,Integer>();
|
||||
private final Directory dir;
|
||||
|
@ -50,7 +48,7 @@ class ReplicaFileDeleter {
|
|||
* (can be opened), false if it cannot be opened, and
|
||||
* (unlike Java's File.exists) throws IOException if
|
||||
* there's some unexpected error. */
|
||||
static boolean slowFileExists(Directory dir, String fileName) throws IOException {
|
||||
private static boolean slowFileExists(Directory dir, String fileName) throws IOException {
|
||||
try {
|
||||
dir.openInput(fileName, IOContext.DEFAULT).close();
|
||||
return true;
|
||||
|
|
|
@ -50,7 +50,9 @@ import org.apache.lucene.store.IndexOutput;
|
|||
import org.apache.lucene.store.Lock;
|
||||
import org.apache.lucene.util.IOUtils;
|
||||
|
||||
/** Replica node, that pulls index changes from the primary node by copying newly flushed or merged index files */
|
||||
/** Replica node, that pulls index changes from the primary node by copying newly flushed or merged index files.
|
||||
*
|
||||
* @lucene.experimental */
|
||||
|
||||
abstract class ReplicaNode extends Node {
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ import org.apache.lucene.store.Directory;
|
|||
import org.apache.lucene.util.ThreadInterruptedException;
|
||||
|
||||
/** A SearcherManager that refreshes via an externally provided (NRT) SegmentInfos, either from {@link IndexWriter} or via
|
||||
* nrt replication to another index. */
|
||||
* nrt replication to another index.
|
||||
*
|
||||
* @lucene.experimental */
|
||||
class SegmentInfosSearcherManager extends ReferenceManager<IndexSearcher> {
|
||||
private volatile SegmentInfos currentInfos;
|
||||
private final Directory dir;
|
||||
|
|
|
@ -58,10 +58,6 @@ import org.apache.lucene.util.ThreadInterruptedException;
|
|||
|
||||
import com.carrotsearch.randomizedtesting.SeedUtils;
|
||||
|
||||
// nocommit why so many "hit SocketException during commit with R0"?
|
||||
|
||||
// nocommit why all these NodeCommunicationExcs?
|
||||
|
||||
/*
|
||||
TODO
|
||||
- fangs
|
||||
|
@ -1145,7 +1141,9 @@ public class TestStressNRTReplication extends LuceneTestCase {
|
|||
}
|
||||
} catch (IOException se) {
|
||||
// Assume primary crashed
|
||||
message("top: indexer lost connection to primary");
|
||||
if (c != null) {
|
||||
message("top: indexer lost connection to primary");
|
||||
}
|
||||
try {
|
||||
c.close();
|
||||
} catch (Throwable t) {
|
||||
|
|
|
@ -432,7 +432,7 @@ public class MockDirectoryWrapper extends BaseDirectoryWrapper {
|
|||
throw new AssertionError();
|
||||
}
|
||||
|
||||
if (true || LuceneTestCase.VERBOSE) {
|
||||
if (LuceneTestCase.VERBOSE) {
|
||||
System.out.println("MockDirectoryWrapper: " + action + " unsynced file: " + name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.apache.lucene.store.Directory;
|
|||
* {@link DirectoryReader}.
|
||||
*
|
||||
* @see DirectoryReader#open(Directory)
|
||||
* @see DirectoryReader#open(IndexWriter, boolean)
|
||||
*/
|
||||
public class StandardIndexReaderFactory extends IndexReaderFactory {
|
||||
|
||||
|
|
Loading…
Reference in New Issue