
com.groupbyinc.flux.common.apache.lucene.store.LockStressTest.class Maven / Gradle / Ivy
???? 3 =com/groupbyinc/flux/common/apache/lucene/store/LockStressTest java/lang/Object LockStressTest.java LOCK_FILE_NAME Ljava/lang/String; test.lock ()V
this ?Lcom/groupbyinc/flux/common/apache/lucene/store/LockStressTest; main ([Ljava/lang/String;)V java/lang/Exception ALcom/groupbyinc/flux/common/apache/lucene/util/SuppressForbidden; reason &System.out required: command line tool java/lang/Throwable Hcom/groupbyinc/flux/common/apache/lucene/store/LockObtainFailedException java/lang/System out Ljava/io/PrintStream; ?Usage: java org.apache.lucene.store.LockStressTest myID verifierHost verifierPort lockFactoryClassName lockDirName sleepTimeMS count
myID = int from 0 .. 255 (should be unique for test process)
verifierHost = hostname that LockVerifyServer is listening on
verifierPort = port that LockVerifyServer is listening on
lockFactoryClassName = primary FSLockFactory class that we will use
lockDirName = path to the lock directory
sleepTimeMS = milliseconds to pause betweeen each lock obtain/release
count = number of locking tries
You should run multiple instances of this process, each with its own
unique ID, and each pointing to the same lock directory, to verify
that locking is working correctly.
Make sure you are first running LockVerifyServer. ! java/io/PrintStream # println (Ljava/lang/String;)V % &
$ ' exit (I)V ) *
+ java/lang/Integer - parseInt (Ljava/lang/String;)I / 0
. 1 myID must be a unique int 0..255 3 java/lang/String 5 java/nio/file/Paths 7 get ;(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path; 9 :
8 ; getNewLockFactory R(Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/store/FSLockFactory; = >
? @com/groupbyinc/flux/common/apache/lucene/store/SimpleFSDirectory A