This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
class RestEndpoint { | |
var streamResponse: CSVStreamResponseOutput | |
constructor(csvStreamResponseOutput: CSVStreamResponseOutput) { | |
this.streamResponse = csvStreamResponseOutput | |
} | |
@GetMapping(path = ["stream"], produces = [MediaType.APPLICATION_STREAM_JSON_VALUE]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
class CSVStreamResponseOutput : StreamingResponseBody { | |
var dataProvider: DataProvider | |
constructor(dataProvider: DataProvider) { | |
this.dataProvider = dataProvider | |
} | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
class DataProvider { | |
/** | |
* create flowable from sampledata.csv | |
* @return every 100ms one line | |
*/ | |
fun getDataStream(): Flowable<String> { | |
val csvFile = this::class.java.getResource("/static/sampledata.csv").openStream() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://pysparksampledata.blob.core.windows.net/sampledata/sampledata.csv > sampledata.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wrk -c 400 -d 10 - latency - timeout 1s http://localhost:8080/cars-locust |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jboss/wildfly | |
ADD helloworld.war /opt/jboss/wildfly/standalone/deployments/ | |
ARG WILDFLY_NAME | |
ARG CLUSTER_PW | |
ENV WILDFLY_NAME=${WILDFLY_NAME} | |
ENV CLUSTER_PW=${CLUSTER_PW} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
wildfly1_1 | ... INFO [org.infinispan.CLUSTER] (MSC service thread 1-3) ISPN000094: Received new cluster view for channel ejb: [wildfly_2_test|1] (2) [wildfly_2_test, wildfly_1_test] | |
wildfly1_1 | ... INFO [org.infinispan.CLUSTER] (MSC service thread 1-5) ISPN000094: Received new cluster view for channel ejb: [wildfly_2_test|1] (2) [wildfly_2_test, wildfly_1_test] | |
wildfly1_1 | ... INFO [org.infinispan.CLUSTER] (MSC service thread 1-1) ISPN000094: Received new cluster view for channel ejb: [wildfly_2_test|1] (2) [wildfly_2_test, wildfly_1_test] | |
wildfly1_1 | ... INFO [org.infinispan.CLUSTER] (MSC service thread 1-7) ISPN000094: Received new cluster view for channel ejb: [wildfly_2_test|1] (2) [wildfly_2_test, wildfly_1_test] | |
... | |
wildfly2_1 | ... INFO [org.infinispan.CLUSTER] (remote-thread--p6-t2) [Context=client-mappings] ISPN100002: Starting rebalance with members [wildfly_2_test, wildfly_1_test], phase READ_OLD_WRITE_ALL, topology id 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
wildfly1: | |
build: | |
context: . | |
args: | |
WILDFLY_NAME: wildfly_1_test | |
CLUSTER_PW: secret_password | |
image: wildfly_1_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(echo -e "[General]\nStartWithLastProfile=1\n"; i=0; for folder in $(ls | |
-td */|grep -v "Pending Pings"|grep -v "Crash Reports"|grep -v | |
profiles.ini); do name=$(echo $folder|cut -f2 -d"."); echo -e | |
"[Profile$i]\nName=$name\nIsRelative=1\nPath=$folder\n"; i=$((i+1)); | |
done) > profiles.ini |
NewerOlder