-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add docker-compose with mysql cluster * add docker-compose with mysql cluster * add docker-compose with mysql cluster * add docker-compose with mysql cluster * add property to index * fix typo * wip * wip * wip * improve date parsing * wip * wip * wip * added xml parsing using stax * minor fix * Removed property MESSAGE * Clean up * Clean up * Works * Extend index * Add loadbalancing * Add fileupload.py * Improve db IO * minor * Fix NPE * renamed columns * works * improving mysql cluster * Add auto.sh * redoing the queries * redoing the queries. add caching * redoing the queries. add caching * indices look good * indices look good --------- Co-authored-by: artur <[email protected]>
- Loading branch information
Showing
53 changed files
with
1,213 additions
and
485 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM maven:3.9.0 as builder | ||
COPY . /app | ||
WORKDIR /app | ||
RUN --mount=type=cache,target=/root/.m2 mvn -pl -web clean install -DskipTests | ||
|
||
FROM openjdk:21-jdk-slim | ||
WORKDIR /app | ||
RUN printenv | ||
COPY --from=builder /app/main/target/fitsinn-main-*.jar ./app.jar | ||
|
||
RUN chown 1001 ./app.jar \ | ||
&& chmod "g+rwX" ./app.jar | ||
|
||
USER 1001 | ||
EXPOSE 8080 | ||
ENTRYPOINT ["java", "-jar", "app.jar"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
source /home/artur/rnd/git/fitsinn/.venv/bin/activate | ||
./mvnw -pl -web -DskipTests clean install | ||
|
||
./mvnw spring-boot:run -f main/pom.xml & | ||
|
||
proc_id=$! | ||
echo proc_id is $proc_id | ||
|
||
sleep 10 | ||
|
||
python fileupload.py http://localhost:8080/multipleupload ~/rnd/data/subset_govdocs/ 100 2 | ||
|
||
|
||
#time curl -X 'POST' 'http://localhost:8080/propertyvalues?property=FORMAT' -H 'accept: */*' -d '' | ||
ab -n 50 -c 1 -p auto.post -T 'text/plain' 'http://localhost:8080/propertyvalues?property=FORMAT' | ||
|
||
echo killing proc_id | ||
kill $proc_id |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: '3.9' | ||
|
||
services: | ||
cassandra: | ||
image: cassandra | ||
ports: | ||
- 9042:9042 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package rocks.artur.api; | ||
|
||
import java.io.File; | ||
import rocks.artur.api_impl.utils.ByteFile; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* This interface enables the following actions: | ||
* - to analyze a digital object using a characterisation tool, | ||
* - to persist a characterisation result in a db. | ||
*/ | ||
public interface AnalyzePersistFile { | ||
Long uploadCharacterisationResults(File file); | ||
Long uploadCharacterisationResults(byte[] file, String filename); | ||
|
||
Long uploadCharacterisationResults(ByteFile file); | ||
|
||
Long uploadCharacterisationResults(List<ByteFile> files); | ||
|
||
} |
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
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
27 changes: 27 additions & 0 deletions
27
core/src/main/java/rocks/artur/api_impl/utils/ByteFile.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package rocks.artur.api_impl.utils; | ||
|
||
public class ByteFile { | ||
byte[] file; | ||
String filename; | ||
|
||
public ByteFile(byte[] file, String filename) { | ||
this.file = file; | ||
this.filename = filename; | ||
} | ||
|
||
public byte[] getFile() { | ||
return file; | ||
} | ||
|
||
public String getFilename() { | ||
return filename; | ||
} | ||
|
||
public void setFile(byte[] file) { | ||
this.file = file; | ||
} | ||
|
||
public void setFilename(String filename) { | ||
this.filename = filename; | ||
} | ||
} |
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
Oops, something went wrong.