finishing toucehs

This commit is contained in:
Antonis Lempesis 2022-02-01 16:57:28 +02:00
parent c093e52d15
commit 35966b6f6e
5 changed files with 7 additions and 42 deletions

View File

@ -1,11 +1,7 @@
FROM openjdk:8-jdk-alpine
VOLUME /tmp
VOLUME /mnt/config
VOLUME /mnt/logs
COPY build/libs/*-SNAPSHOT.jar app.jar
RUN ln -s /mnt/config/application.properties ./application.properties
EXPOSE 1880
ENTRYPOINT ["java","-jar","/app.jar", "--config.location=application.properties"]
ENTRYPOINT ["java","-jar","/app.jar", "--spring.config.location=file:///mnt/config/application.properties"]

View File

@ -12,7 +12,7 @@ import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
@Repository
public final class ImpalaConnector {
public class ImpalaConnector {
private static final Logger logger = LoggerFactory.getLogger(ImpalaConnector.class);

View File

@ -14,6 +14,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.sql.Timestamp;
@ -21,6 +22,7 @@ import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
@RestController
@RequestMapping("/test")
public class TestController extends GeneralController {
private static final Logger logger = LoggerFactory.getLogger(TestController.class);

View File

@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.configurationprocessor.json.JSONException;
import org.springframework.boot.configurationprocessor.json.JSONObject;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Component;
import java.io.File;
@ -20,8 +21,7 @@ public class TestFileUtils {
private static final Logger logger = LoggerFactory.getLogger(TestFileUtils.class);
@Value("classpath:testInputFiles/orderedList1000.json")
Resource testResource;
Resource testResource = new ClassPathResource("testInputFiles/orderedList1000.json");
public ThreadLocal<Integer> duplicateIdUrlEntries = new ThreadLocal<>();
public ThreadLocal<Scanner> inputScanner = new ThreadLocal<>(); // Every Thread has its own variable.

View File

@ -1,33 +0,0 @@
<configuration debug="false">
<appender name="RollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/UrlsController.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>logs/UrlsController.%i.log.zip</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>20</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>50MB</maxFileSize>
</triggeringPolicy>
<encoder>
<charset>UTF-8</charset>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M\(@%line\) - %msg%n</pattern>
</encoder>
</appender>
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>UTF-8</charset>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{36}.%M\(@%line\)) - %msg%n</pattern>
</encoder>
</appender>
<root level="debug">
<appender-ref ref="RollingFile" />
</root>
</configuration>