Skip to content

Commit

Permalink
Merge branch 'master' into 133-graal-vm-test
Browse files Browse the repository at this point in the history
  • Loading branch information
abpai94 authored Sep 16, 2024
2 parents 51ab8d8 + 418acd8 commit 933d278
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 189 deletions.
48 changes: 24 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
<staging.dir>${project.build.directory}/staging</staging.dir>
<jmockit-version>1.5</jmockit-version>
<graalvm.version>22.3.5</graalvm.version>
<jackson.version>2.12.7.1</jackson.version>
<compiler.dir>${project.build.directory}/compiler</compiler.dir>
</properties>

Expand Down Expand Up @@ -695,7 +694,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<version>2.16.1</version>
<type>jar</type>
<optional>false</optional>
</dependency>
Expand All @@ -709,7 +708,7 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
<version>1.3.4</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
Expand All @@ -721,7 +720,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.9</version>
<version>2.0.16</version>
<type>jar</type>
<optional>false</optional>
</dependency>
Expand Down Expand Up @@ -749,7 +748,7 @@
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7.14</version>
<version>1.7.15</version>
<type>jar</type>
<optional>false</optional>
</dependency>
Expand All @@ -761,21 +760,21 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.78</version>
<version>1.78.1</version>
<type>jar</type>
<optional>false</optional>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.5.0</version>
<version>1.9.0</version>
<type>jar</type>
<optional>false</optional>
</dependency>
<dependency>
<groupId>org.samba.jcifs</groupId>
<groupId>jcifs</groupId>
<artifactId>jcifs</artifactId>
<version>1.3.3</version>
<version>1.3.17</version>
<type>jar</type>
<optional>false</optional>
</dependency>
Expand All @@ -801,7 +800,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<type>jar</type>
<optional>false</optional>
</dependency>
Expand All @@ -813,7 +812,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.0-jre</version>
<version>33.3.0-jre</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
Expand All @@ -829,54 +828,55 @@
jaxb 2.3.6 with maven-jaxb2-plugin 0.15.1
-->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0.1</version>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.6</version>
<version>4.0.5</version>
</dependency>
<dependency>
<groupId>net.java.xadisk</groupId>
<artifactId>xadisk</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
<version>1.5</version>
<groupId>jakarta.resource</groupId>
<artifactId>jakarta.resource-api</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.btm</groupId>
<artifactId>btm</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.21</version>
<version>4.0.22</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.directory.api</groupId>
<artifactId>api-all</artifactId>
<version>2.1.3</version>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<version>2.17.2</version>
</dependency>
</dependencies>

Expand Down
145 changes: 0 additions & 145 deletions src/install/check_lsc.sh

This file was deleted.

10 changes: 5 additions & 5 deletions src/install/check_lsc_status_file.pl
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ sub check_critical_param {
}

# Get statistics
my ( $all, $modify, $modified, $errors ) =
my ( $taskname, $taskmode, $all, $modify, $modified, $errors ) =
( $last =~
/All entries: (\d+), to modify entries: (\d+), (?:successfully )?modified entries: (\d+), errors: (\d+)/mi
/(\w+) - (\w+) - All entries: (\d+), to modify entries: (\d+), (?:successfully )?modified entries: (\d+), errors: (\d+)/mi
);

#==========================================================================
Expand All @@ -224,17 +224,17 @@ sub check_critical_param {
# Test the errors and exit
if ( $errors == 0 or $errors < $warning ) {
print
"OK - LSC is running with $errors errors (W:$warning - C:$critical)$perfparse\n";
"OK - LSC task $taskname in mode $taskmode is running with $errors errors (W:$warning - C:$critical)$perfparse\n";
exit $ERRORS{'OK'};
}
elsif ( $errors >= $warning and $errors < $critical ) {
print
"WARNING - LSC is running with $errors errors (W:$warning - C:$critical)$perfparse\n";
"WARNING - LSC task $taskname in mode $taskmode is running with $errors errors (W:$warning - C:$critical)$perfparse\n";
exit $ERRORS{'WARNING'};
}
else {
print
"CRITICAL - LSC is running with $errors errors (W:$warning - C:$critical)$perfparse\n";
"CRITICAL - LSC task $taskname in mode $taskmode is running with $errors errors (W:$warning - C:$critical)$perfparse\n";
exit $ERRORS{'CRITICAL'};
}

Expand Down
24 changes: 14 additions & 10 deletions src/main/java/org/lsc/AbstractSynchronize.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ protected final boolean clean2Ldap(Task task) {
LOGGER.info("If you want to avoid this message, " + "increase the time limit by using dedicated parameter.");
}

logStatus(counter);
logStatus(task.getName(), Task.Mode.clean.toString(), counter);
return counter.getCountError() == 0;
}

Expand Down Expand Up @@ -231,7 +231,7 @@ protected final boolean synchronize2Ldap(final Task task) {
LOGGER.info("If you want to avoid this message, " + "increase the time limit by using dedicated parameter.");
}

logStatus(counter);
logStatus(task.getName(), Task.Mode.sync.toString(), counter);
return counter.getCountError() == 0;
}

Expand Down Expand Up @@ -298,7 +298,7 @@ public final String getTaskFullStatus(final String syncName) {
if(asyncThread != null && asyncThread.isAlive()) {
AsynchronousRunner asyncRunner = mapSTasks.get(syncName);
InfoCounter counter = asyncRunner.getCounter();
return getLogStatus(counter);
return getLogStatus(syncName, Task.Mode.async.toString(), counter);
} else {
return null;
}
Expand Down Expand Up @@ -392,20 +392,24 @@ public final void logShouldAction(final LscModifications lm, final String syncNa
LSCStructuralLogger.DESTINATION.debug("", lm);
}

protected void logStatus(InfoCounter counter) {
String totalsLogMessage = getLogStatus(counter);
protected void logStatus(String taskName, String taskMode, InfoCounter counter) {
String totalsLogMessage = getLogStatus(taskName, taskMode, counter);
if (counter.getCountError() > 0) {
LOGGER.error(totalsLogMessage);
} else {
LOGGER.info(totalsLogMessage);
}
}

protected String getLogStatus(InfoCounter counter) {
return "All entries: "+ counter.getCountAll() +
", to modify entries: "+ counter.getCountModifiable() +
", successfully modified entries: "+counter.getCountCompleted()+
", errors: "+counter.getCountError();
protected String getLogStatus(String taskName, String taskMode, InfoCounter counter) {

String totalsLogMessage =
taskName + " - " + taskMode +
" - All entries: "+ counter.getCountAll() +
", to modify entries: "+ counter.getCountModifiable() +
", successfully modified entries: "+counter.getCountCompleted()+
", errors: "+counter.getCountError();
return totalsLogMessage;
}

public IBean getBean(Task task, IService service, String pivotName, LscDatasets pivotAttributes, boolean fromSameService, boolean fromSource) throws LscServiceException {
Expand Down
Loading

0 comments on commit 933d278

Please sign in to comment.