Commit 3fcbc8fe authored by Michael Ritter's avatar Michael Ritter

Merge branch 'release-1.14.1'

parents 86061733 1f575d74
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>ace-am</artifactId>
<name>ace-am</name>
......@@ -55,35 +57,29 @@
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
<version>6.0.32</version>
<artifactId>tomcat-catalina</artifactId>
<version>7.0.94</version>
<scope>provided</scope>
</dependency>
<!-- for persistence -->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.1</version>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
</dependency>
<!-- for json -->
<!--
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.1</version>
</dependency>
-->
<dependency>
<groupId>net.java.dev.rome</groupId>
......@@ -93,9 +89,8 @@
<!-- for Jstl / webapp stuff-->
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
......@@ -104,14 +99,13 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>javax.servlet.jsp.jstl-api</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
......@@ -124,31 +118,26 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>25.0-jre</version>
</dependency>
<dependency>
......@@ -200,12 +189,14 @@
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.24</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.24</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
......
......@@ -593,9 +593,12 @@ public final class AuditThread extends Thread implements CancelCallback {
LOG.trace("Generated checksum: " + currentFileHash + " expected checksum: " + storedDigest);
LogEvent event;
// If we have a registered file, set the digested value
// If we have a registered file:
// set the stored digest to be the generated hash
// set the file digest of the current monitored_item to the generated hash
if (null == storedDigest) {
LOG.trace("Setting digest for registered file " + item.getPath());
storedDigest = currentFileHash;
item.setFileDigest(currentFileHash);
item.setLastSeen(new Date());
}
......
......@@ -35,6 +35,12 @@ import edu.umiacs.ace.monitor.audit.AuditConfigurationContext;
import edu.umiacs.ace.monitor.audit.AuditConfigurationContext.PauseBean;
import edu.umiacs.ace.util.PersistUtil;
import edu.umiacs.sql.SQL;
import org.apache.log4j.Logger;
import org.apache.log4j.NDC;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.sql.DataSource;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.sql.Blob;
......@@ -43,11 +49,6 @@ import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.sql.DataSource;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.apache.log4j.Logger;
import org.apache.log4j.NDC;
/**
* Token migration listner to migrate tokens from the older pre-1.6 version to the current 1.6+
......@@ -225,7 +226,7 @@ public class TokenMigrationContextListener implements ServletContextListener {
+ writeStmt.executeBatch().length);
writeConn.commit();
LOG.info("Entried processed: " + i);
LOG.info("Entries processed: " + i);
} catch ( SQLException e ) {
writeConn.rollback();
LOG.error("SQL Exception while moving tokens");
......
......@@ -139,7 +139,7 @@ public class IngestStore extends EntityManagerServlet {
IngestThreadPool tPool = IngestThreadPool.getInstance();
tPool.submitTokens(batchTokens, coll);
response.sendRedirect("/TokenImportStatus?active=" + coll.getId());
response.sendRedirect("TokenImportStatus?active=" + coll.getId());
}
}
......@@ -33,7 +33,7 @@ public class IngestSupervisor implements Runnable {
public IngestSupervisor(final Map<String, Token> tokens, final Collection coll) {
this.tokens = tokens;
this.coll = coll;
this.pool = new ForkJoinPool();
this.pool = ForkJoinPool.commonPool();
this.states = new ConcurrentHashMap<>();
// so we don't have to worry about npes
......@@ -58,7 +58,7 @@ public class IngestSupervisor implements Runnable {
dirTask.quietlyJoin();
fileTask.quietlyJoin();
pool.shutdown();
// pool.shutdown();
LOG.info("Leaving Supervisor");
}
......
......@@ -32,7 +32,6 @@ package edu.umiacs.ace.monitor.register;
import edu.umiacs.ace.monitor.core.Collection;
import edu.umiacs.ace.monitor.core.MonitoredItem;
import edu.umiacs.ace.monitor.core.MonitoredItemManager;
import edu.umiacs.ace.monitor.core.Token;
import edu.umiacs.ace.monitor.log.LogEnum;
import edu.umiacs.ace.monitor.log.LogEvent;
......@@ -45,6 +44,9 @@ import org.apache.log4j.Logger;
import javax.persistence.EntityManager;
import javax.persistence.EntityTransaction;
import javax.persistence.TypedQuery;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
......@@ -93,7 +95,7 @@ public class IngestThread extends RecursiveAction {
return;
}
if (identifiers.size() < 7000) {
if (identifiers.size() < 2500) {
// TODO: I still want to play around with rollbacks in case of failure
em = PersistUtil.getEntityManager();
EntityTransaction trans = em.getTransaction();
......@@ -115,7 +117,6 @@ public class IngestThread extends RecursiveAction {
MonitoredItem item;
session = System.currentTimeMillis();
logManager = new LogEventManager(session, coll);
MonitoredItemManager mim = new MonitoredItemManager(em);
// Cycle through all items read in and add/update tokens
// Commit only if there are no errors in all transactions
......@@ -123,7 +124,7 @@ public class IngestThread extends RecursiveAction {
for (String identifier : identifiers) {
queued.remove(identifier);
Token token = tokens.get(identifier);
item = mim.getItemByPath(identifier, coll);
item = getItemByPath(identifier, coll);
if (item == null) {
LOG.debug("[Ingest Thread " + Thread.currentThread().getId()
+ "] Adding new item " + identifier);
......@@ -256,4 +257,28 @@ public class IngestThread extends RecursiveAction {
mi.setSize(size);
return mi;
}
/**
* From MIM but without locking
*
* @param path path to look for
* @return MonitoredItem if exist, null otherwise
*/
public MonitoredItem getItemByPath(String path, Collection c) {
MonitoredItem tmp = new MonitoredItem();
tmp.setPath(path);
TypedQuery<MonitoredItem> q =
em.createNamedQuery("MonitoredItem.getItemByPath", MonitoredItem.class);
q.setParameter("path", path);
q.setParameter("coll", c);
// Make sure we have the correct item
List<MonitoredItem> li = q.getResultList();
li.sort(Comparator.comparing(MonitoredItem::getPath));
int idx = Collections.binarySearch(li, tmp, Comparator.comparing(MonitoredItem::getPath));
return (idx >= 0 ? li.get(idx) : null);
}
}
\ No newline at end of file
......@@ -141,7 +141,9 @@ public class IngestThreadPool {
protected static void shutdownPools() {
LOG.debug("[Ingest] Shutting down thread pools.");
cache.invalidateAll();
if (cache != null) {
cache.invalidateAll();
}
}
}
......@@ -7,20 +7,29 @@ Author : toaster
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Replica Added</title>
<title>Collection Remove</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<jsp:include page="header.jsp" />
<div class="standardBody">
<h3>Confirm Remove</h3>
All replica, file, and log information for the collection ${workingCollection.collection.name} will be removed forever. Click Remove to proceed.
<BR><a href="ManageCollection?remove=yes&collectionid=${workingCollection.collection.id}">Remove</a>&nbsp;&nbsp;&nbsp;<a href="Status">Back</a>
<p>
All replica, file, and log information for the collection
${workingCollection.collection.name} will be removed forever. This process can take
time for larger collections, which may continue to appear until the remove is
complete.
</p>
<p>Click Remove to proceed.</p>
<a href="ManageCollection?remove=yes&collectionid=${workingCollection.collection.id}">
Remove</a>&nbsp;&nbsp;&nbsp;
<a href="Status">Back</a>
</div>
<jsp:include page="footer.jsp" />
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>ace-common</artifactId>
<name>ace-common</name>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>ace-dist</artifactId>
<name>ace-dist</name>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>ace-ims-api</artifactId>
<name>ace-ims-api</name>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<packaging>ear</packaging>
......@@ -21,8 +21,8 @@
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.45</version>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.62</version>
</dependency>
<dependency>
<groupId>edu.umiacs.ace</groupId>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>ace-ims-ejb</artifactId>
<name>ace-ims-ejb</name>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>ace-ims-server</artifactId>
<name>ace-ims-server</name>
......
......@@ -4,7 +4,7 @@
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>ace-ims-war</artifactId>
<name>ace-ims-war</name>
......@@ -24,8 +24,8 @@
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.45</version>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.62</version>
</dependency>
<dependency>
<groupId>edu.umiacs.ace</groupId>
......@@ -47,8 +47,7 @@
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
......
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>ace-ims-ws</artifactId>
<name>ace-ims-ws</name>
......@@ -28,7 +29,8 @@
</wsdlUrl>
</wsdlUrls>
<bindingFiles>
<bindingFile>${basedir}/src/main/resources/jaxb-bindings.xml</bindingFile>
<bindingFile>${basedir}/src/main/resources/jaxb-bindings.xml
</bindingFile>
</bindingFiles>
<packageName>edu.umiacs.ace.ims.ws</packageName>
</configuration>
......@@ -41,4 +43,24 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- JavaEE dependencies for JAXB and JAX-WS
see also: http://openjdk.java.net/jeps/320#Java-EE-modules -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.3.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>rt</artifactId>
<version>2.3.1</version>
</dependency>
</dependencies>
</project>
......@@ -4,7 +4,7 @@
<parent>
<artifactId>ace</artifactId>
<groupId>edu.umiacs.ace</groupId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
</parent>
<artifactId>audit-core</artifactId>
<name>Core audit queue</name>
......
......@@ -6,7 +6,7 @@
<groupId>edu.umiacs.ace</groupId>
<artifactId>ace</artifactId>
<version>1.14-RELEASE</version>
<version>1.14.1-RELEASE</version>
<packaging>pom</packaging>
<scm>
<connection>scm:git:https://gitlab.umiacs.umd.edu/adapt/ace.git</connection>
......@@ -25,11 +25,46 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>5.0.0</version>
<configuration>
<cveValidForHours>12</cveValidForHours>
<failBuildOnCVSS>11</failBuildOnCVSS>
<skipProvidedScope>true</skipProvidedScope>
<skipRuntimeScope>true</skipRuntimeScope>
<!--
<suppressionFiles>
<suppressionFile>suppressions.xml</suppressionFile>
</suppressionFiles>
-->
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.license>umd</project.license>
<!-- dependency bom -->
<jaxb.version>2.3.1</jaxb.version>
<jaxws.version>2.3.1</jaxws.version>
<jersey.version>2.28</jersey.version>
<guava.version>28.0-jre</guava.version>
<commons-io.version>2.6</commons-io.version>
<commons-fu.version>1.4</commons-fu.version>
<commons-csv.version>1.6</commons-csv.version>
<commons-collections.version>4.3</commons-collections.version>
<log4j2.version>2.11.2</log4j2.version>
<eclipselink.version>2.7.4</eclipselink.version>
</properties>
<repositories>
......@@ -72,12 +107,128 @@
</snapshotRepository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<!-- log4j2 -->
<!--
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
-->
<!-- glassfish/tomcat -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>
<!-- audit manager misc -->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
<version>1.2.5</version>
</dependency>
<!-- audit manager jersey -->
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
</dependency>
<!-- apache commons + guava -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${commons-collections.version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fu.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>${commons-csv.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<!-- audit manager database (eclipselink) -->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
<version>${eclipselink.version}</version>
</dependency>
<!-- JavaEE jaxb dependencies -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<!-- JavaEE jaxws -->
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>${jaxws.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>rt</artifactId>
<version>${jaxws.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!--
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
-->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
......@@ -106,7 +257,7 @@
<module>ace-ims-server</module>
<module>ace-ims-ejb</module>
<module>ace-ims-war</module>
<module>ace-ims-ear</module>
<module>ace-ims-ear</module>
</modules>
</project>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment