All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.groupbyinc.flux.common.apache.lucene.store.LockStressTest.class Maven / Gradle / Ivy

There is a newer version: 59
Show newest version
????3=com/groupbyinc/flux/common/apache/lucene/store/LockStressTestjava/lang/ObjectLockStressTest.javaLOCK_FILE_NAMELjava/lang/String;	test.lock()V

this?Lcom/groupbyinc/flux/common/apache/lucene/store/LockStressTest;main([Ljava/lang/String;)Vjava/lang/ExceptionALcom/groupbyinc/flux/common/apache/lucene/util/SuppressForbidden;reason&System.out required: command line tooljava/lang/ThrowableHcom/groupbyinc/flux/common/apache/lucene/store/LockObtainFailedExceptionjava/lang/SystemoutLjava/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..2553java/lang/String5java/nio/file/Paths7get;(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;9:
8;getNewLockFactoryR(Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/store/FSLockFactory;=>
?@com/groupbyinc/flux/common/apache/lucene/store/SimpleFSDirectoryALcom/groupbyinc/flux/common/apache/lucene/store/NoLockFactory;EF	DGS(Ljava/nio/file/Path;Lcom/groupbyinc/flux/common/apache/lucene/store/LockFactory;)V
I
BJjava/net/InetSocketAddressL(Ljava/lang/String;I)V
N
MOjava/lang/StringBuilderQ
RConnecting to server Tappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;VW
RX-(Ljava/lang/Object;)Ljava/lang/StringBuilder;VZ
R[ and registering as client ](I)Ljava/lang/StringBuilder;V_
R`...btoString()Ljava/lang/String;de
Rfjava/net/Socketh
isetReuseAddress(Z)Vkl
imconnect(Ljava/net/SocketAddress;I)Vop
iqgetOutputStream()Ljava/io/OutputStream;st
iugetInputStream()Ljava/io/InputStream;wx
iyjava/io/OutputStream{write}*
|~flush?
|?Ccom/groupbyinc/flux/common/apache/lucene/store/VerifyingLockFactory?j(Lcom/groupbyinc/flux/common/apache/lucene/store/LockFactory;Ljava/io/InputStream;Ljava/io/OutputStream;)V
?
??java/util/Random?
?java/io/InputStream?read()I??
??java/io/IOException?Protocol violation?
&
??[Ljava/lang/String;?java/nio/file/Path?:com/groupbyinc/flux/common/apache/lucene/store/LockFactory?:com/groupbyinc/flux/common/apache/lucene/store/FSDirectory?
obtainLock?(Lcom/groupbyinc/flux/common/apache/lucene/store/Directory;Ljava/lang/String;)Lcom/groupbyinc/flux/common/apache/lucene/store/Lock;??
??nextInt(I)I??
??nextBoolean()Z??
??3com/groupbyinc/flux/common/apache/lucene/store/Lock?
Double obtain?close?
??
addSuppressed(Ljava/lang/Throwable;)V??
?java/lang/Thread?sleep(J)V??
??@Y(D)Ljava/lang/StringBuilder;V?
R?% done.?
i?	Finished ? tries.?x2Ljava/lang/Throwable;
secondLock5Lcom/groupbyinc/flux/common/apache/lucene/store/Lock;loeJLcom/groupbyinc/flux/common/apache/lucene/store/LockObtainFailedException;liILjava/io/OutputStream;inLjava/io/InputStream;verifyLF???????????4?????"???_??X??>??5??T??????????????????=z?Ho??Pg?_X??jM??uB??|;??	?-??
?!???5/0?BCE*F2G6J=KHLPM_NjOuQ|S?T?U?W?X?Y?Z?[?]?^?_`cdg)h7iAjIk[minsm|o?s?t?h?tvtxy4|:g@~fWo~????7!????66???Mi|?????8???66???Mi|?????H??66???Mi|???????66???Mi|????WGH??66???Mi|??????66???Mi|???B+??66???MiQGH??66???Mi??66???Ms
=>
??*?????????L*????????L??Y?RY?S?Y*?Y?g????!"?!"? 	
#	?????"?#?
Q?P?




© 2015 - 2025 Weber Informatics LLC | Privacy Policy