From: vasary.daniel Date: Thu, 11 Feb 2021 10:57:25 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=c68a4710fa374d90e47b825a8435f417b9a662a6;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32150 --- diff --git a/server/-product/production/AMC/configuration/config.ini b/server/-product/production/AMC/configuration/config.ini new file mode 100644 index 00000000..fd4c203b --- /dev/null +++ b/server/-product/production/AMC/configuration/config.ini @@ -0,0 +1,9 @@ +#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser +#Wed Feb 10 16:05:17 CET 2021 +osgi.bundles=reference\:file\:cglib_2.2.2.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-annotations_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-core_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-databind_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.dataformat.jackson-dataformat-yaml_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.datatype.jackson-datatype-joda_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-base_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.module.jackson-module-jaxb-annotations_2.4.5.jar@4,reference\:file\:com.ibm.db2.jcc_1.4.0.jar@4,reference\:file\:com.ibm.nosql_4.19.26.jar@4,reference\:file\:com.microsoft.sqlserver.sqljdbc_6.0.8112.100.jar@4,reference\:file\:com.sun.jna_4.2.0.jar@4,reference\:file\:groovy_3.0.3.jar@4,reference\:file\:io.humble.video-arch-x86_64-pc-linux-gnu6_0.2.1.jar@4,reference\:file\:io.humble.video-arch-x86_64-w64-mingw32_0.2.1.jar@4,reference\:file\:io.humble.video-noarch_0.2.1.jar@4,reference\:file\:javax.annotation-api_1.2.0.jar@4,reference\:file\:javax.mail_1.5.0.b01.jar@4,reference\:file\:javax.servlet-api_3.1.0.jar@4,reference\:file\:javax.ws.rs-api_2.0.1.jar@4,reference\:file\:jcifs_1.3.17.jar@4,reference\:file\:joda-time_2.2.0.jar@4,reference\:file\:junit_4.12.0.jar@4,reference\:file\:org.apache.aries.spifly.dynamic.bundle_1.0.8.jar@4,reference\:file\:org.apache.aries.util_1.0.0.jar@4,reference\:file\:org.apache.commons.beanutils_1.8.3.jar@4,reference\:file\:org.apache.commons.collections_3.2.2.jar@4,reference\:file\:org.apache.commons.digester_3.2.0.jar@4,reference\:file\:org.apache.commons.io_2.6.0.jar@4,reference\:file\:org.apache.commons.lang_2.6.0.jar@4,reference\:file\:org.apache.commons.net_3.6.0.jar@4,reference\:file\:org.apache.felix.gogo.command_0.12.0.jar@4,reference\:file\:org.apache.felix.gogo.runtime_0.12.0.jar@4,reference\:file\:org.apache.felix.gogo.shell_0.12.0.jar@4,reference\:file\:org.apache.httpcomponents.httpclient_4.2.6.jar@4,reference\:file\:org.apache.httpcomponents.httpcore_4.2.5.jar@4,reference\:file\:org.apache.logging.log4j.api_2.8.2.jar@1\:start,reference\:file\:org.apache.logging.log4j.core_2.8.2.jar@4,reference\:file\:org.apache.logging.log4j.slf4j-impl_2.8.2.jar@4,reference\:file\:org.apache.servicemix.bundles.quartz_2.3.0.2.jar@4,reference\:file\:org.eclipse.equinox.common_3.8.0.v20160509-1230.jar@2\:start,reference\:file\:org.eclipse.equinox.console_1.1.200.v20150929-1405.jar@4,reference\:file\:org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar@1\:start,reference\:file\:org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar@4,reference\:file\:org.eclipse.equinox.util_1.0.500.v20130404-1337.jar@4,reference\:file\:org.eclipse.jetty.client_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.deploy_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.http_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.io_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.osgi.boot_9.3.9.v20160517.jar@4\:start,reference\:file\:org.eclipse.jetty.schemas_3.1.0.jar@4,reference\:file\:org.eclipse.jetty.security_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.server_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.servlet_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.util_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.webapp_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.api_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.client_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.common_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.server_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.servlet_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.xml_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.osgi.services_3.2.100.v20100503.jar@4,reference\:file\:org.hamcrest.core_1.3.0.jar@4,reference\:file\:org.jboss.resteasy.client_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxb-provider_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxrs_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxrs-api_3.0.11.Final.jar@4,reference\:file\:org.jmock_2.6.0.jar@4,reference\:file\:org.jmock.junit4_2.6.0.jar@4,reference\:file\:org.mybatis.mybatis_3.5.2.jar@4,reference\:file\:org.objectweb.asm_5.0.1.jar@4,reference\:file\:org.objectweb.asm.commons_5.0.1.jar@4,reference\:file\:org.objectweb.asm.tree_5.0.1.jar@4,reference\:file\:org.omnifaces_3.4.1.jar@4,reference\:file\:slf4j.api_1.7.24.jar@4,reference\:file\:slf4j.simple_1.7.2.jar@4,reference\:file\:user.commons.log4j2_1.0.0.jar@4,reference\:file\:user.commons.zk_8.0.3.jar@4,reference\:file\:user.jobengine.osgi.commons_1.0.0.jar@4\:start,reference\:file\:user.jobengine.osgi.db_1.0.0.jar@4,reference\:file\:user.jobengine.osgi.server_1.0.0.jar@4,reference\:file\:user.jobengine.osgi.services_1.0.0.jar@4,reference\:file\:user.mediacube.gui_1.0.0.jar@4,reference\:file\:user.mediacube.metadata_1.0.0.jar@4,reference\:file\:user.tsm.client_1.2.0.jar@4 +equinox.use.ds=true +osgi.bundles.defaultStartLevel=4 +osgi.framework=file\:plugins/org.eclipse.osgi_3.11.2.v20161107-1947.jar +osgi.framework.extensions= +eclipse.p2.data.area=@config.dir/../p2 +eclipse.p2.profile=DefaultProfile diff --git a/server/-product/production/AMC/configuration/etc/gosh_profile b/server/-product/production/AMC/configuration/etc/gosh_profile new file mode 100644 index 00000000..1c659f49 --- /dev/null +++ b/server/-product/production/AMC/configuration/etc/gosh_profile @@ -0,0 +1 @@ +prompt=mc> \ No newline at end of file diff --git a/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/EscortFiles.class b/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/EscortFiles.class new file mode 100644 index 00000000..82b58552 Binary files /dev/null and b/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/EscortFiles.class differ diff --git a/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/PBQuery$MMMedia.class b/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/PBQuery$MMMedia.class new file mode 100644 index 00000000..eb6cb52d Binary files /dev/null and b/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/PBQuery$MMMedia.class differ diff --git a/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/PBQuery.class b/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/PBQuery.class new file mode 100644 index 00000000..e5a67790 Binary files /dev/null and b/server/-product/production/AMC/jobs/classes/user/jobengine/server/steps/PBQuery.class differ diff --git a/server/-product/production/AMC/jobs/executors.xml b/server/-product/production/AMC/jobs/executors.xml new file mode 100644 index 00000000..0f868e57 --- /dev/null +++ b/server/-product/production/AMC/jobs/executors.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/AMC/jobs/schedules.json b/server/-product/production/AMC/jobs/schedules.json new file mode 100644 index 00000000..a6bb1e5d --- /dev/null +++ b/server/-product/production/AMC/jobs/schedules.json @@ -0,0 +1,123 @@ +{"joblist":[ + { + "template": "test-fork-cancelable.xml", + "parameters": [ {"name": "itemID", "value": 1, "type": "java.lang.Long"} ] + }, + { + "template": "validate-dir-mxf.xml", + "parameters": [ {"name": "source", "value": "h:/TEMP/", "type": "java.lang.String"} ] + }, + { + "template": "nexio1-archive-checker.xml", + "name" : "NEXIO1 archiválás előkészítése", + "active": true, + "executeimmediate": false, + "cronexpression": "0 0 */1 * * ?", + "parameters": + [ + {"name": "sourceStoreName", "value": "NEXIO1", "type": "java.lang.String"}, + {"name": "escortStoreName", "value": "MEDIACUBE_DOWNLOADS", "type": "java.lang.String"}, + {"name": "lastModifiedHours", "value": 3, "type": "java.lang.Integer"} + ] + }, + { + "template": "nexio2-archive-checker.xml", + "name" : "NEXIO2 archiválás előkészítése", + "active": true, + "executeimmediate": false, + "cronexpression": "0 0 */1 * * ?", + "parameters": + [ + {"name": "sourceStoreName", "value": "NEXIO2", "type": "java.lang.String"}, + {"name": "escortStoreName", "value": "MEDIACUBE_DOWNLOADS", "type": "java.lang.String"}, + {"name": "lastModifiedHours", "value": 3, "type": "java.lang.Integer"} + ] + }, + { + "template": "fork-validate-and-archive.xml", + "name" : "Kötegelt validálás és archiválás", + "active": true, + "executeimmediate": false, + "cronexpression": "0 */30 * * * ?", + "parameters": + [ + {"name": "sourceStoreName", "value": "MEDIACUBE_DOWNLOADS", "type": "java.lang.String"}, + {"name": "template", "value": "validate-and-archive.xml", "type": "java.lang.String"}, + {"name": "expectedColorSpace", "value": "", "type": "java.lang.String"}, + {"name": "limit", "value": 100, "type": "java.lang.Integer"} + ] + }, + { + "template": "harris1-missingmaterial-checker.xml", + "name" : "HARRIS1 missing material lekérdezés", + "active": true, + "executeimmediate": false, + "cronexpression": "0 */5 * * * ?", + "parameters": + [ + {"name": "vicFiles", "value": ["z:\\NEXIO.VIC", "z:\\EDIT 9.VIC", "z:\\TRIM2.VIC"], "type": "com.ibm.nosql.json.api.BasicDBList"}, + {"name": "escortStoreName", "value": "MEDIACUBE_UPLOADS", "type": "java.lang.String"}, + {"name": "targetStoreName", "value": "NEXIO1", "type": "java.lang.String"}, + {"name": "targetProtocol", "value": "FTP", "type": "java.lang.String"} + ] + }, + { + "template": "harris2-missingmaterial-checker.xml", + "name" : "HARRIS2 missing material lekérdezés", + "active": true, + "executeimmediate": false, + "cronexpression": "0 */5 * * * ?", + "parameters": + [ + {"name": "vicFiles", "value": ["z:\\NEXIO2.VIC", "z:\\EDIT-4.VIC", "z:\\EDIT 10.VIC"], "type": "com.ibm.nosql.json.api.BasicDBList"}, + {"name": "escortStoreName", "value": "MEDIACUBE_UPLOADS", "type": "java.lang.String"}, + {"name": "targetStoreName", "value": "NEXIO2", "type": "java.lang.String"}, + {"name": "targetProtocol", "value": "FTP", "type": "java.lang.String"} + ] + }, + { + "template": "peablebeach-missingmaterial-checker.xml", + "name" : "PEABLEBEACH missing material lekérdezés", + "active": true, + "executeimmediate": false, + "cronexpression": "0 */5 * * * ?", + "parameters": + [ + {"name": "escortStoreName", "value": "MEDIACUBE_UPLOADS", "type": "java.lang.String"}, + {"name": "lookupStoreNames", "value": ["PEABLEBEACH", "PASAPOOL", "SELENIOPOOL", "SELENIOPOOL_16_9", "SELENIOPOOL_16_9_PROCESSING", "SELENIOPOOL_4_3", "SELENIOPOOL_4_3_PROCESSING"], "type": "com.ibm.nosql.json.api.BasicDBList"}, + {"name": "targetStoreName", "value": "PASAPOOL", "type": "java.lang.String"}, + {"name": "targetProtocol", "value": "FTP", "type": "java.lang.String"}, + {"name": "primaryEndPoint", "value": "http://10.170.100.61:18083", "type": "java.lang.String"}, + {"name": "primaryUserName", "value": "pbs", "type": "java.lang.String"}, + {"name": "primaryPassword", "value": "pbs", "type": "java.lang.String"}, + {"name": "secondaryEndPoint", "value": "http://10.170.100.62:18083", "type": "java.lang.String"}, + {"name": "secondaryUserName", "value": "pbs", "type": "java.lang.String"}, + {"name": "secondaryPassword", "value": "pbs", "type": "java.lang.String"}, + {"name": "rangeForwardHours", "value": 168, "type": "java.lang.Integer"} + ] + }, + { + "template": "fork-validate-and-restore.xml", + "name" : "Kötegelt validálás és visszatöltés", + "active": true, + "executeimmediate": false, + "cronexpression": "0 */1 * * * ?", + "parameters": + [ + {"name": "sourceStoreName", "value": "MEDIACUBE_UPLOADS", "type": "java.lang.String"}, + {"name": "template", "value": "validate-and-restore.xml", "type": "java.lang.String"}, + {"name": "expectedColorSpace", "value": "", "type": "java.lang.String"}, + {"name": "limit", "value": 0, "type": "java.lang.Integer"} + ] + }, + { + "template": "register-user-restore.xml", + "name" : "Felhasználói visszatöltés regisztráció", + "active": false, + "executeimmediate": false, + "parameters": + [ + {"name": "escortStoreName", "value": "MEDIACUBE_UPLOADS", "type": "java.lang.String"} + ] + } +]} diff --git a/server/-product/production/AMC/jobs/steps/CancelableStep.java b/server/-product/production/AMC/jobs/steps/CancelableStep.java new file mode 100644 index 00000000..40812594 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/CancelableStep.java @@ -0,0 +1,58 @@ +package user.jobengine.server.steps; + +import org.apache.commons.net.ftp.FTPClient; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.StoreUri; +import user.commons.remotestore.FtpDirectoryLister; +import user.commons.remotestore.RemoteStoreProtocol; + +public class CancelableStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + int count = 10; + + @StepEntry + public Object[] execute(int param) throws Exception { + try { + // ftpTest(); + + for (int i = 0; i < count; i++) { + if (getJobRuntime().isWaitingCancel()) + break; + Thread.sleep(500); + int progress = (i + 1) * 100 / count; + setProgress(progress); + + } + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + return null; + } + + void ftpTest() throws Exception { + StoreUri source = null; + StoreUri target = null; + try { + source = getManager().getStoreUri("MEDIACUBE_UPLOADS", RemoteStoreProtocol.LOCAL); + target = getManager().getStoreUri("NEXIO1", RemoteStoreProtocol.FTP); + source.addProgressListener(e -> setProgress(e.getProgress())); + logger.info("Uploading file PART_TEST.mxf"); + source.transferFrom(target, "PART_TEST.mxf", "PART_TEST.mxf"); + FTPClient client = ((FtpDirectoryLister) target.getLister()).connect(); + logger.info("Renaming file PART_TEST.mxf to RENAME_TEST.mxf"); + client.rename("PART_TEST.mxf", "RENAME_TEST.mxf"); + } catch (Exception e) { + logger.catching(e); + } finally { + if (target != null) + target.cleanUp(); + if (source != null) + source.cleanUp(); + } + + } + +} diff --git a/server/-product/production/AMC/jobs/steps/DirMXFValidatorStep.java b/server/-product/production/AMC/jobs/steps/DirMXFValidatorStep.java new file mode 100644 index 00000000..f26d679b --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/DirMXFValidatorStep.java @@ -0,0 +1,61 @@ +package user.jobengine.server.steps; + +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.mediatool.MediaInfo; +import user.jobengine.db.Media; + +public class DirMXFValidatorStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + + @StepEntry + public Object[] execute(String source) throws Exception { + Path path = Paths.get(source); + DirectoryStream directoryStream = Files.newDirectoryStream(path); + for (Path file : directoryStream) { + if (getJobRuntime().isWaitingCancel()) { + cancel(); + return null; + } + + if (file.toFile().isDirectory()) + continue; + + String fileName = file.getFileName().toString(); + if (fileName.contains(".")) + fileName = fileName.substring(0, fileName.lastIndexOf(".")); + + if (file.toFile().length() == 0) { + logger.error("Zero: {}", fileName); + continue; + } + + Media media = getManager().getMedia(fileName); + long frames = 0; + if (media == null) { + logger.warn("Unchecked yet: {}", fileName); + } else + frames = media.getLength(); + + MediaInfo mi = null; + + try { + mi = new MediaInfo(file); + mi.process(); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + logger.error("Unreadable: {}", fileName); + } + + logger.info("Valid: {} MC farmes {} FF frames {}", fileName, frames, mi.getFrames()); + } + + return null; + } +} diff --git a/server/-product/production/AMC/jobs/steps/FILEZILLA_AVIDTransferToStep.java b/server/-product/production/AMC/jobs/steps/FILEZILLA_AVIDTransferToStep.java new file mode 100644 index 00000000..97747098 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/FILEZILLA_AVIDTransferToStep.java @@ -0,0 +1,11 @@ +package user.jobengine.server.steps; + +import user.commons.StoreUri; + +public class FILEZILLA_AVIDTransferToStep extends TransferStep { + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + return super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } +} diff --git a/server/-product/production/AMC/jobs/steps/FILEZILLA_PASARESTORETransferToStep.java b/server/-product/production/AMC/jobs/steps/FILEZILLA_PASARESTORETransferToStep.java new file mode 100644 index 00000000..d69a6ed4 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/FILEZILLA_PASARESTORETransferToStep.java @@ -0,0 +1,11 @@ +package user.jobengine.server.steps; + +import user.commons.StoreUri; + +public class FILEZILLA_PASARESTORETransferToStep extends TransferStep { + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + return super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } +} diff --git a/server/-product/production/AMC/jobs/steps/FileCleanupStep.java b/server/-product/production/AMC/jobs/steps/FileCleanupStep.java new file mode 100644 index 00000000..505526cf --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/FileCleanupStep.java @@ -0,0 +1,34 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.message.Message; +import org.apache.logging.log4j.message.ParameterizedMessage; + +import user.commons.StoreUri; + +public class FileCleanupStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String fileName, String escortFile) throws Exception { + try { + + Message msg = new ParameterizedMessage("A {} fájl visszatöltése befejeződött.", fileName); + EscortFiles.notifyRecipient(Paths.get(escortFile), logger, msg); + + Path filePath = Paths.get(sourceStoreUri.toString(true), fileName); + EscortFiles.remove(filePath); + EscortFiles.remove(Paths.get(escortFile)); + EscortFiles.remove(Paths.get(escortFile + EscortFiles.DOT_CATCHED)); + } catch (Exception e) { + logger.error(e.getMessage()); + throw e; + } + return null; + } + +} diff --git a/server/-product/production/AMC/jobs/steps/FileValidatorStep.java b/server/-product/production/AMC/jobs/steps/FileValidatorStep.java new file mode 100644 index 00000000..e8662e49 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/FileValidatorStep.java @@ -0,0 +1,155 @@ +package user.jobengine.server.steps; + +import java.io.FileNotFoundException; +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.commons.lang.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.message.Message; +import org.apache.logging.log4j.message.ParameterizedMessage; + +import user.commons.DownloadableMedia; +import user.commons.StoreUri; +import user.commons.mediatool.MediaInfo; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Media; + +public class FileValidatorStep extends JobStep { + private static final String COLORSPACE = "COLORSPACE"; + private static final Logger logger = LogManager.getLogger(); + private static final String testSimulate = System.getProperty("test.simulate"); + + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String fileName, long expectedFrameNumber, long expectedSize, String exceptedColorSpace, String escortFile) + throws Exception { + if (!RemoteStoreProtocol.LOCAL.equals(sourceStoreUri.getProtocol())) + throw new Exception("Store URI protocol must be local."); + Path filePath = Paths.get(sourceStoreUri.toString(true), fileName); + if (!filePath.toFile().exists()) + throw new FileNotFoundException("File not exists: " + filePath.toString()); + + Path escortFilePath = Paths.get(escortFile); + + if (getJobRuntime().isWaitingCancel()) { + EscortFiles.remove(filePath); + //EscortFiles.remove(escortFilePath); + EscortFiles.remove(Paths.get(escortFile + EscortFiles.DOT_CATCHED)); + + Message msg = new ParameterizedMessage("A {} fájl visszatöltése kezelői beavatkozás miatt megszakadt.", fileName); + EscortFiles.notifyRecipient(escortFilePath, logger, msg); + + cancel(); + return null; + } + + DownloadableMedia downloadable = null; + try { + downloadable = EscortFiles.decode(escortFilePath); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + } + + if (downloadable != null && expectedFrameNumber == 0) + storeCurrentFrames(filePath, downloadable); + + if (downloadable != null && downloadable.containsKey("skipValidation") && downloadable.getBoolean("skipValidation")) + return null; + + if (expectedFrameNumber > 0 || StringUtils.isNotBlank(exceptedColorSpace)) + validateMedia(filePath, expectedFrameNumber, exceptedColorSpace, escortFile); + + if (expectedSize > 0) + validateSize(filePath, expectedSize, escortFile); + + //A metadata persister miatt torlunk mindet teszt modban + /* + if (StringUtils.isNotBlank(testSimulate)) { + EscortFiles.remove(escortFilePath); + EscortFiles.remove(Paths.get(escortFile + EscortFiles.DOT_CATCHED)); + logger.info(getMarker(), "{} deleted to prevent real processing", escortFile); + } + */ + logger.info(getMarker(), "{} passed validation", fileName); + return null; + } + + private void storeCurrentFrames(Path filePath, DownloadableMedia downloadable) { + MediaInfo mi = null; + try { + mi = new MediaInfo(filePath); + mi.process(); + long frames = mi.getFrames(); + + if (downloadable.containsKey("mediaId")) { + Media media = getManager().getMedia(downloadable.getLong("mediaId")); + if (media != null) { + media.setLength(frames); + getManager().modify(media); + } + + } + + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + } + } + + private void validateMedia(Path filePath, long expectedFrameNumber, String exceptedColorSpace, String escortFile) throws Exception { + MediaInfo mi = null; + try { + mi = new MediaInfo(filePath); + mi.process(); + + if (expectedFrameNumber > 0) { + long frames = mi.getFrames(); + if (Math.abs(frames - expectedFrameNumber) > 3) { + Message msg = new ParameterizedMessage("Validációs hiba miatt a {} fájl másolása nem lehetséges.", filePath.getFileName()); + EscortFiles.notifyRecipient(Paths.get(escortFile), logger, msg); + + //200924 komment, mert a mar TSM-bol letoltott mozikat hagyjuk ott, a download irany ugyis felulir + //EscortFiles.remove(filePath); + //EscortFiles.remove(Paths.get(escortFile)); + + //200911 a kommentet kivettem, mert ezeket is torolni kell + EscortFiles.remove(Paths.get(escortFile + EscortFiles.DOT_CATCHED)); + throw new Exception("Length mismatch in " + filePath + ". Expected: " + expectedFrameNumber + ", found: " + frames); + } + if (frames != expectedFrameNumber) + logger.warn(getSessionMarker(), "A {} fájl másolása lehetséges, de a képkockaszám nem egyezik. Várt: {}, aktuális: {}", + expectedFrameNumber, frames); + } + + if (StringUtils.isNotBlank(exceptedColorSpace)) { + String colorSpace = mi.getColorSpace(); + if (colorSpace == null) { + EscortFiles.createFellow(escortFile, COLORSPACE); + throw new Exception("Can not determine color space in " + filePath); + } + + if (!colorSpace.equals(exceptedColorSpace)) { + EscortFiles.createFellow(escortFile, COLORSPACE); + throw new Exception("Expected color space is " + exceptedColorSpace + ", but found " + colorSpace); + } + } + + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } + } + + private void validateSize(Path filePath, long expectedSize, String escortFile) throws Exception { + try { + long length = filePath.toFile().length(); + if (length != expectedSize) + throw new Exception("Size mismatch. Expected: " + expectedSize + ", found: " + length); + + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } + } + +} diff --git a/server/-product/production/AMC/jobs/steps/ForkDownloadStep.java b/server/-product/production/AMC/jobs/steps/ForkDownloadStep.java new file mode 100644 index 00000000..8b72db9d --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/ForkDownloadStep.java @@ -0,0 +1,199 @@ +package user.jobengine.server.steps; + +import java.io.IOException; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.DownloadableMedia; +import user.commons.JobStatus; +import user.commons.MediaCubeMarker; +import user.commons.StoreUri; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Store; +import user.jobengine.server.IJobEngine; +import user.jobengine.server.IJobRuntime; + +public class ForkDownloadStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + + @StepEntry + public Object[] execute(String tempStoreName, String template, String expectedColorSpace, int limit) throws Exception { + + sendStatusReport(); + //return null; + DirectoryStream directoryStream = null; + int count = limit; + int allCount = 0; + int currentCount = 0; + + try { + StoreUri tempStoreUri = getManager().getStoreUri(tempStoreName, RemoteStoreProtocol.LOCAL); + Path path = Paths.get(tempStoreUri.toString(true), ".STATUS"); + + List escortFiles = new ArrayList<>(); + directoryStream = Files.newDirectoryStream(path); + for (Path escortFile : directoryStream) { + if (getJobRuntime().isWaitingCancel()) { + cancel(); + return null; + } + escortFiles.add(escortFile); + } + allCount = escortFiles.size(); + escortFiles.sort((p1, p2) -> { + return Long.valueOf(p1.toFile().lastModified()).compareTo(p2.toFile().lastModified()); + }); + + if (allCount > 0) { + for (Path escortFile : escortFiles) { + if (getJobRuntime().isWaitingCancel()) { + cancel(); + break; + } + + if (processPathItem(tempStoreUri, template, escortFile)) { + count--; + if (count == 0) + break; + } + currentCount++; + int progress = currentCount * 100 / allCount; + setProgress(progress); + } + } + + setProgress(100); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } finally { + if (directoryStream != null) { + try { + directoryStream.close(); + } catch (IOException e) { + } + } + } + + return null; + } + + private boolean processPathItem(StoreUri tempStoreUri, String template, Path escortFile) throws IOException { + if (escortFile.toFile().isDirectory()) + return false; + + //ami nem JSON azt nem kezeljuk + if (!escortFile.getFileName().toString().toLowerCase().endsWith(EscortFiles.DOT_JSON)) + return false; + + //aminek van COLORSPACE kiterjesztesu valtozata azt nem kezeljuk + // Path colorspaceFile = Paths.get(escortFile.toString() + ".colorspace"); + // if (colorspaceFile.toFile().exists()) + // return false; + + if (EscortFiles.isCatchedFileExists(escortFile)) + return false; + + String escortFileName = escortFile.getFileName().toString(); + //minimum 3 karakter: STORENAME.FILENAME.MXF.JSON + long dotCount = escortFileName.chars().filter(ch -> ch == '.').count(); + if (dotCount < 3) + return false; + + try { + DownloadableMedia downloadable = EscortFiles.decode(escortFile); + if (downloadable == null) { + logger.error(getSessionMarker(), "Can't encode {}", escortFile); + return false; + } + + StoreUri sourceStoreUri = getManager().getStoreUri(downloadable.getLong("sourceStoreUriId")); + StoreUri targetStoreUri = getManager().getStoreUri(downloadable.getLong("targetStoreUriId")); + + Store sourceStore = getManager().getStore(sourceStoreUri.getStoreId()); + String sourceStoreName = sourceStore.getName(); + template = sourceStoreName + "-" + template; + logger.info(getMarker(), "Starting {} for {}", template, escortFileName); + + String sourceFileName = downloadable.getString("fileName"); + Map parameters = new HashMap<>(); + parameters.put("sourceStoreUri", sourceStoreUri); + parameters.put("fileName", sourceFileName); + parameters.put("tempStoreUri", tempStoreUri); + parameters.put("targetStoreUri", targetStoreUri); + parameters.put("expectedFrameNumber", downloadable.getLong("frames")); + parameters.put("expectedSize", downloadable.getLong("size")); + parameters.put("expectedColorSpace", downloadable.getString("colorSpace")); + parameters.put("escortFile", escortFile.toAbsolutePath().toString()); + + int priority = 50; + + //megszakitasok miatt a mar lejott mozikat vegyuk elore 20.09.09 + if (targetExists(tempStoreUri, sourceFileName)) + priority = 51; + + //parameterek: IJobRuntime parent, String template, String name, int priority, Map parameters + IJobRuntime child = getEngine().submit(null, e -> { + if (e.getStatus().equals(JobStatus.CANCELED) || e.getStatus().equals(JobStatus.SUSPENDED)) + EscortFiles.removeCatchedFile(escortFile); + }, template, "Archiválás", priority, IJobEngine.DEFAULT_OWNER, parameters); + if (child == null) + throw new Exception("Submit error."); + + child.setDescription(sourceFileName); + + child.setRelated(downloadable.getString("title") + " / " + sourceStoreName); + + EscortFiles.createCatchedFile(escortFile); + + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + return false; + } + + return true; + } + + private void sendStatusReport() { + IJobEngine engine = getEngine(); + int jobCount = 0; + StringBuilder sb = new StringBuilder(); + Map jobs = engine.getJobs(); + if (jobs != null) { + Set keys = jobs.keySet(); + jobCount = keys.size(); + for (Long key : keys) { + IJobRuntime runtime = jobs.get(key); + if (JobStatus.SUSPENDED.equals(runtime.getStatus())) + sb.append(runtime.getRelated() + " SUSPENDED: " + runtime.getDescription() + "
"); + } + } + MediaCubeMarker marker = new MediaCubeMarker(); + marker.setSubject("AMC MediaCube feldolgozási sor " + jobCount); + logger.info(marker, sb.toString()); + } + + private boolean targetExists(StoreUri storeUri, String fileName) { + try { + Path targetFile = Paths.get(storeUri.toString(true), fileName); + if (targetFile.toFile().exists()) { + logger.info(getMarker(), "Retrieved file {} exists", fileName); + return true; + } + } catch (Exception e) { + logger.error(getMarker(), e.getMessage()); + } + logger.info(getMarker(), "Retrieved file {} not exists yet", fileName); + return false; + } +} diff --git a/server/-product/production/AMC/jobs/steps/ForkUploadStep.java b/server/-product/production/AMC/jobs/steps/ForkUploadStep.java new file mode 100644 index 00000000..67010d4c --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/ForkUploadStep.java @@ -0,0 +1,214 @@ +package user.jobengine.server.steps; + +import java.io.IOException; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.DownloadableMedia; +import user.commons.JobStatus; +import user.commons.StoreUri; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Media; +import user.jobengine.db.MediaFile; +import user.jobengine.db.Store; +import user.jobengine.server.IJobEngine; +import user.jobengine.server.IJobRuntime; + +public class ForkUploadStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + + @StepEntry + public Object[] execute(String tempStoreName, String template, String expectedColorSpace, int limit) throws Exception { + DirectoryStream directoryStream = null; + int count = limit; + int allCount = 0; + int currentCount = 0; + + try { + StoreUri tempStoreUri = getManager().getStoreUri(tempStoreName, RemoteStoreProtocol.LOCAL); + Path path = Paths.get(tempStoreUri.toString(true), ".STATUS"); + + List escortFiles = new ArrayList<>(); + directoryStream = Files.newDirectoryStream(path); + for (Path escortFile : directoryStream) { + if (getJobRuntime().isWaitingCancel()) { + cancel(); + return null; + } + escortFiles.add(escortFile); + } + allCount = escortFiles.size(); + //a file neve az adasbakerules idopontjaval kezdodik + // escortFiles.sort((p1, p2) -> { + // return p1.compareTo(p2); + // }); + + //200911 megis inkabb a letrehozas idopontja legyen + escortFiles.sort((p1, p2) -> { + return Long.valueOf(p1.toFile().lastModified()).compareTo(p2.toFile().lastModified()); + }); + + if (allCount > 0) { + for (Path escortFile : escortFiles) { + if (getJobRuntime().isWaitingCancel()) { + cancel(); + break; + } + + if (processPathItem(tempStoreUri, template, escortFile)) { + count--; + if (count == 0) + break; + } + currentCount++; + int progress = currentCount * 100 / allCount; + setProgress(progress); + } + } + + setProgress(100); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } finally { + if (directoryStream != null) { + try { + directoryStream.close(); + } catch (IOException e) { + } + } + } + + return null; + } + + private String getTSMFileName(long mediaId, StoreUri sourceStoreUri) { + String result = null; + Media media = getManager().getMedia(mediaId); + + if (media != null) { + List mediaFiles = media.getMediaFiles(); + for (MediaFile mediaFile : mediaFiles) { + if (mediaFile.getStoreId() == sourceStoreUri.getStoreId()) { + result = mediaFile.getRelativePath(); + break; + } + } + } + + return result; + } + + private boolean processPathItem(StoreUri tempStoreUri, String template, Path escortFile) throws IOException { + if (escortFile.toFile().isDirectory()) + return false; + + //ami nem JSON azt nem kezeljuk + if (!escortFile.getFileName().toString().toLowerCase().endsWith(EscortFiles.DOT_JSON)) + return false; + + //aminek van COLORSPACE kiterjesztésű + // Path colorspaceFile = Paths.get(escortFile.toString() + ".colorspace"); + // if (colorspaceFile.toFile().exists()) + // return false; + + if (EscortFiles.isCatchedFileExists(escortFile)) + return false; + + String escortFileName = escortFile.getFileName().toString(); + //minimum 3 karakter: STORENAME.FILENAME.MXF.JSON + long dotCount = escortFileName.chars().filter(ch -> ch == '.').count(); + if (dotCount < 3) + return false; + + try { + DownloadableMedia downloadable = EscortFiles.decode(escortFile); + + if (downloadable == null) { + logger.error(getSessionMarker(), "Can't decode {}", escortFile); + return false; + } + + StoreUri sourceStoreUri = getManager().getStoreUri("TSM", RemoteStoreProtocol.TSM); + + long mediaId = downloadable.getLong("mediaId"); + String tsmFileName = getTSMFileName(mediaId, sourceStoreUri); + if (StringUtils.isBlank(tsmFileName)) { + logger.error(getMarker(), "Media ID not exists anymore {}", mediaId); + return false; + } + + StoreUri targetStoreUri = getManager().getStoreUri(downloadable.getLong("targetStoreUriId")); + + Store targetStore = getManager().getStore(targetStoreUri.getStoreId()); + template = targetStore.getName() + "-" + template; + logger.info(getMarker(), "Starting {} for {}", template, escortFileName); + + String targetFileName = downloadable.getString("fileName"); + + Map parameters = new HashMap<>(); + parameters.put("sourceStoreUri", sourceStoreUri); + parameters.put("tsmFileName", tsmFileName); + parameters.put("fileName", targetFileName); + parameters.put("tempStoreUri", tempStoreUri); + parameters.put("targetStoreUri", targetStoreUri); + parameters.put("relativeTargetPath", downloadable.getString("relativeTargetPath")); + parameters.put("expectedFrameNumber", downloadable.getLong("frames")); + parameters.put("expectedSize", downloadable.getLong("size")); + parameters.put("expectedColorSpace", downloadable.getString("colorSpace")); + parameters.put("escortFile", escortFile.toAbsolutePath().toString()); + + //int priority = downloadable.containsKey("priority") ? downloadable.getInt("priority") : 0; + //mindenki egyforman induljon 20.09.07 + //a NEXIO egy kicsit fontosabb 20.09.08. megsem 20.09.09 + //int priority = escortFile.toString().contains("NEXIO") ? 51 : 50; + //megszakitasok miatt a mar lejott mozikat vegyuk elore 20.09.09 + + int priority = 50; + if (targetExists(tempStoreUri, targetFileName)) + priority = 51; + + //parameterek: IJobRuntime parent, String template, String name, int priority, Map parameters + IJobRuntime child = getEngine().submit(null, e -> { + if (e.getStatus().equals(JobStatus.CANCELED) || e.getStatus().equals(JobStatus.SUSPENDED)) + EscortFiles.removeCatchedFile(escortFile); + }, template, "Visszatöltés", priority, IJobEngine.DEFAULT_OWNER, parameters); + if (child == null) + throw new Exception("Submit error."); + + child.setDescription(escortFileName); + + child.setRelated(downloadable.getString("title") + " / " + targetStore.getName()); + EscortFiles.createCatchedFile(escortFile); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + return false; + } + + return true; + } + + private boolean targetExists(StoreUri storeUri, String fileName) { + try { + Path targetFile = Paths.get(storeUri.toString(true), fileName); + if (targetFile.toFile().exists()) { + logger.info(getMarker(), "Retrieved file {} exists", fileName); + return true; + } + } catch (Exception e) { + logger.error(getMarker(), e.getMessage()); + } + logger.info(getMarker(), "Retrieved file {} not exists yet", fileName); + return false; + } +} diff --git a/server/-product/production/AMC/jobs/steps/GenericArchiveCheckerStep.java b/server/-product/production/AMC/jobs/steps/GenericArchiveCheckerStep.java new file mode 100644 index 00000000..1e6078ec --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/GenericArchiveCheckerStep.java @@ -0,0 +1,93 @@ +package user.jobengine.server.steps; + +import java.io.IOException; +import java.nio.file.Paths; +import java.sql.Timestamp; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.DownloadableMedia; +import user.commons.RemoteFile; +import user.commons.StoreUri; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Media; + +public class GenericArchiveCheckerStep extends JobStep { + private static final String DOT_MXF = ".MXF"; + private static final Logger logger = LogManager.getLogger(); + + private boolean check(Timestamp modified, Timestamp created, Media media) { + boolean create = media == null; + create |= create || !media.getModified().equals(modified); + create |= create || !media.getCreated().equals(created); + return create; + } + + @StepEntry + public Object[] execute(String sourceStoreName, String protocol, String wildCard, String escortStoreName, int limit) throws Exception { + StoreUri sourceStoreUri = null; + int count = limit; + + try { + sourceStoreUri = getManager().getStoreUri(sourceStoreName, Enum.valueOf(RemoteStoreProtocol.class, protocol)); + StoreUri escortSoreUri = getManager().getStoreUri(escortStoreName, RemoteStoreProtocol.LOCAL); + StoreUri targetStoreUri = getManager().getStoreUri("TSM", RemoteStoreProtocol.TSM); + + String outputPath = Paths.get(escortSoreUri.toString(true)).toString(); + + //az FTP store nem tamogatja az asszinkron listazast + List remoteFiles = sourceStoreUri.getRemoteFiles(wildCard); + for (RemoteFile remoteFile : remoteFiles) { + if (processClip(sourceStoreName, remoteFile, sourceStoreUri, targetStoreUri, outputPath)) + count--; + + if (count == 0) { + logger.info("Limit reached: {}", limit); + break; + } + + } + } catch (Exception e) { + throw e; + } finally { + if (sourceStoreUri != null) + sourceStoreUri.cleanUp(); + } + + return null; + } + + private boolean processClip(String storeName, RemoteFile remoteFile, StoreUri sourceStoreUri, StoreUri targetStoreUri, String outputPath) { + boolean result = false; + String title = remoteFile.getName(); + Timestamp modified = Timestamp.from(remoteFile.getModify().toInstant()); + Timestamp created = Timestamp.from(remoteFile.getCreated().toInstant()); + + //TODO a masolas alatt allo klippeket kiszurni + if (title.contains(".")) + title = title.substring(0, title.indexOf(".")); + long size = remoteFile.getSize(); + + Media media = getManager().getMedia(title); + + boolean createEscort = check(modified, created, media); + + if (createEscort) { + long mediaId = media == null ? 0 : media.getId(); + String fileName = title + DOT_MXF; + DownloadableMedia archive = DownloadableMedia.create(title, fileName, modified, created, 0, size, sourceStoreUri.getId(), targetStoreUri.getId(), + mediaId); + String escortFileName = storeName + "." + remoteFile.getName(); + try { + result = EscortFiles.createMetadataIfNotExists(outputPath, escortFileName, archive.toPrettyString("")); + } catch (IOException e) { + logger.error("Escort file creation error.", e); + } + } + + return result; + } + +} diff --git a/server/-product/production/AMC/jobs/steps/HarrisMissingMaterialCheckerStep.java b/server/-product/production/AMC/jobs/steps/HarrisMissingMaterialCheckerStep.java new file mode 100644 index 00000000..9f683503 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/HarrisMissingMaterialCheckerStep.java @@ -0,0 +1,171 @@ +package user.jobengine.server.steps; + +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.net.ftp.FTPClient; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.ibm.nosql.json.api.BasicDBList; + +import user.commons.DownloadableMedia; +import user.commons.StoreUri; +import user.commons.harris.HarrisRecord; +import user.commons.harris.VICFileParser; +import user.commons.remotestore.FtpDirectoryLister; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Media; + +public class HarrisMissingMaterialCheckerStep extends JobStep { + private static final Logger logger = LogManager.getLogger(HarrisMissingMaterialCheckerStep.class); + private static final String lineFormat = System.getProperty("harris.vic.lineformat", + "A TTTTTTTT LLLLLLLLLLL MMMMMMMMMMMMMMMMMMMMMMM X DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"); + private static final String validTypeCodes = System.getProperty("harris.vic.validtypecodes", "SPACE,E"); + private static final String appendExtension = System.getProperty("missingmaterial.appendextension", ".mxf"); + + @StepEntry + public Object[] execute(BasicDBList vicFiles, String escortStoreName, String targetStoreName, String targetProtocol) throws Exception { + StoreUri escortStoreUri = null; + StoreUri targetStoreUri = null; + try { + getJobRuntime().setRelated(targetStoreName + " restore"); + + escortStoreUri = getManager().getStoreUri(escortStoreName, RemoteStoreProtocol.LOCAL); + targetStoreUri = getManager().getStoreUri(targetStoreName, Enum.valueOf(RemoteStoreProtocol.class, targetProtocol)); + StoreUri sourceStoreUri = getManager().getStoreUri("TSM", RemoteStoreProtocol.TSM); + List records = null; + for (Object vicFile : vicFiles) { + if (getJobRuntime().isWaitingCancel()) { + cancel(); + break; + } + + Path vicFilePath = Paths.get(String.valueOf(vicFile)); + + if (!vicFilePath.toFile().exists()) { + logger.warn("File not exists: {}", vicFilePath); + continue; + } + + logger.info(getMarker(), "Processing {}", vicFilePath); + records = processVICFile(records, vicFilePath); + } + + if (records != null && !getJobRuntime().isWaitingCancel()) { + FTPClient client = ((FtpDirectoryLister) targetStoreUri.getLister()).connect(); + logger.info(getMarker(), "Reading target file list"); + List fileNames = Arrays.asList(client.listNames()); + logger.info(getMarker(), "Target file list reading completed, mediabase size is {}", fileNames.size()); + int i = 0; + for (HarrisRecord record : records) { + + if (getJobRuntime().isWaitingCancel()) { + cancel(); + break; + } + + boolean contains = fileNames.contains(record.getFileName() + ".lxf"); + if (contains) + logger.info(getMarker(), "File {} already exists on {}", record.getFileName(), targetStoreName); + else + processRecord(record, targetStoreName, sourceStoreUri, targetStoreUri, escortStoreUri); + i++; + int progress = i * 100 / records.size(); + setProgress(progress); + } + } + + if (records == null || records.size() == 0) + logger.info(getMarker(), "Nothing to do"); + else + logger.info(getMarker(), "Completed"); + + setProgress(100); + } catch (Exception e) { + logger.error(e.getMessage()); + throw e; + } finally { + if (escortStoreUri != null) + escortStoreUri.cleanUp(); + if (targetStoreUri != null) + targetStoreUri.cleanUp(); + } + + return null; + } + + private boolean processRecord(HarrisRecord record, String targetStoreName, StoreUri sourceStoreUri, StoreUri targetStoreUri, StoreUri escortStoreUri) + throws Exception { + + String fileName = record.getFileName(); + String outputPath = Paths.get(escortStoreUri.toString(true)).toString(); + + if (StringUtils.isNotBlank(appendExtension)) + fileName += appendExtension; + + String escortFileName = targetStoreName + "." + fileName; + + //ha mar letezik, nem toltjuk fel ujra (a vic fajlbol kezzel torlik valamikor...) + try { + if (EscortFiles.isMetadataExists(outputPath, escortFileName)) { + logger.debug(getMarker(), "Status file already exists {}", escortFileName); + return true; + } + } catch (IOException e1) { + logger.info(getMarker(), "Status file check error for {}", fileName); + return true; + } + + //nincs bent MC-ben + Media media = getManager().getMedia(record.getFileName()); + if (media == null) { + logger.error(getSessionMarker(), "File is not available in archive {}", record.getFileName()); + return true; + } + + // if (existsOnNexio(record, targetStoreName, targetStoreUri)) { + // logger.info(getMarker(), "File {} already exists on {}", record.getFileName(), targetStoreName); + // return false; + // } + + DownloadableMedia downloadable = DownloadableMedia.create(media.getTitle(), fileName, media.getModified(), media.getCreated(), media.getLength(), 0L, + sourceStoreUri.getId(), targetStoreUri.getId(), media.getId()); + + //alapbol magasabb (1-99) + downloadable.put("priority", 50); + downloadable.put("isNexio", true); + + try { + EscortFiles.createMetadata(outputPath, escortFileName, downloadable.toPrettyString("")); + logger.info(getMarker(), "Status file created {}", escortFileName); + } catch (Exception e) { + logger.error("Can't create escort file {}. System message is: {}", escortFileName, e.getMessage()); + } + return true; + } + + private List processVICFile(List records, Path vicFilePath) { + VICFileParser parser = null; + try { + parser = new VICFileParser(vicFilePath, lineFormat, validTypeCodes); + + List currentRecords = parser.getRecords(); + if (records == null) + records = currentRecords; + else { + if (currentRecords != null) + records.addAll(currentRecords); + } + + } catch (Exception e) { + logger.error(e.getMessage()); + } + return records; + } + +} diff --git a/server/-product/production/AMC/jobs/steps/MetadataPersisterStep.java b/server/-product/production/AMC/jobs/steps/MetadataPersisterStep.java new file mode 100644 index 00000000..43fd68c9 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/MetadataPersisterStep.java @@ -0,0 +1,110 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.sql.Timestamp; +import java.time.Instant; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.DownloadableMedia; +import user.commons.StoreUri; +import user.jobengine.db.IItemManager; +import user.jobengine.db.Item; +import user.jobengine.db.Media; +import user.jobengine.db.MediaFile; + +public class MetadataPersisterStep extends JobStep { + private static final String GENERIC = "Generic"; + private static final Logger logger = LogManager.getLogger(); + + @StepEntry + public Object[] execute(StoreUri targetStoreUri, String escortFile) throws Exception { + try { + + Path escortFilePath = Paths.get(escortFile); + //ha nem ment at a letoltott file az ellenorzesen, akkor már torolve lett + if (escortFilePath.toFile().exists()) { + String escortFileName = escortFilePath.getFileName().toString(); + String sourceStoreName = escortFileName.substring(0, escortFileName.indexOf(".")); + DownloadableMedia downloadable = EscortFiles.decode(escortFilePath); + String title = downloadable.getString("title"); + String fileName = downloadable.getString("fileName"); + long mediaId = downloadable.containsKey("mediaId") ? downloadable.getLong("mediaId") : 0; + String fileTypeName = fileName.substring(fileName.lastIndexOf(".") + 1).toUpperCase(); + + IItemManager manager = getManager(); + + if (mediaId == 0) { + mediaId = tryGetMediaId(title, mediaId); + } + + //TODO ha van mediaId, akkor update!!!!!!!!! + + Timestamp modified = downloadable.getTimestamp("modified"); + Timestamp created = downloadable.getTimestamp("created"); + long frames = downloadable.getLong("frames"); + + if (mediaId == 0) { + String targetStoreName = getManager().getStore(targetStoreUri.getStoreId()).getName(); + //ez elszallhat, mert nincs filetype vagy store + MediaFile mediaFile = manager.createMediaFile(fileName, fileTypeName, targetStoreName); + //ez elszallhat, mert nincs itemtype + Item item = manager.createItem(GENERIC, title, sourceStoreName, null); + //ez elszallhat, mert nincs itemtype + Media media = manager.createMedia(GENERIC, title, sourceStoreName, null); + + //TODO megoldani egy tranzakcioban + item.add(); + media.setItemId(item.getId()); + media.setLength(frames); + media.setCreated(created); + media.setModified(modified); + media.setArchived(Timestamp.from(Instant.now())); + media.add(); + + //TODO + //mediaFile.setFileSize(fileSize); + mediaFile.setMediaId(media.getId()); + mediaFile.setLastModified(modified); + mediaFile.add(); + } else { + Media media = manager.getMedia(mediaId); + media.setLength(frames); + media.setCreated(created); + media.setModified(modified); + media.setArchived(Timestamp.from(Instant.now())); + manager.modify(media); + + //TODO + //mediaFile.setFileSize(fileSize); + MediaFile mediaFile = manager.getSystemMediaFile(media); + mediaFile.setRelativePath(fileName); + mediaFile.setLastModified(modified); + manager.modify(mediaFile); + } + + } else + logger.error(getMarker(), "Status file does not exists {}", escortFilePath); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } + return null; + } + + private long tryGetMediaId(String title, long mediaId) { + Media media = null; + //duplikatum miatt + try { + media = getManager().getMedia(title); + if (media != null) + mediaId = media.getId(); + } catch (Exception e) { + logger.error(getMarker(), "Media with title {} is not available. System message is: {}", title, e.getMessage()); + } + return mediaId; + } + +} diff --git a/server/-product/production/AMC/jobs/steps/NEXIO1TransferFromStep.java b/server/-product/production/AMC/jobs/steps/NEXIO1TransferFromStep.java new file mode 100644 index 00000000..7963459f --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/NEXIO1TransferFromStep.java @@ -0,0 +1,30 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.StoreUri; + +public class NEXIO1TransferFromStep extends TransferStep { + private static final Logger logger = LogManager.getLogger(); + + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + Object[] result = null; + try { + Path targetFile = Paths.get(targetStoreUri.toString(true), targetFileName); + if (targetFile.toFile().exists()) { + logger.info(getMarker(), "Using previously retrived file {}", targetFile); + } else { + result = super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } + } catch (Exception e) { + logger.error(getMarker(), e.getMessage()); + } + return result; + } +} diff --git a/server/-product/production/AMC/jobs/steps/NEXIO1TransferToStep.java b/server/-product/production/AMC/jobs/steps/NEXIO1TransferToStep.java new file mode 100644 index 00000000..5af53df1 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/NEXIO1TransferToStep.java @@ -0,0 +1,54 @@ +package user.jobengine.server.steps; + +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.net.ftp.FTPClient; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.StoreUri; +import user.commons.remotestore.FtpDirectoryLister; + +public class NEXIO1TransferToStep extends TransferStep { + private static final Logger logger = LogManager.getLogger(); + + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + // + // try { + // String title = targetFileName; + // if (title.contains(".")) + // title = title.substring(0, title.lastIndexOf(".")); + // RemoteFile remoteFile = targetStoreUri.getFileWithContent(title + ".xml"); + // if (remoteFile != null && remoteFile.getContent() != null) { + // logger.info("File already exists on NEXIO1 {}", targetFileName); + // return null; + // } + // } catch (Exception e) { + // logger.error(e.getMessage()); + // } finally { + // targetStoreUri.cleanUp(); + // } +/* + try { + FTPClient client = ((FtpDirectoryLister) targetStoreUri.getLister()).connect(); + logger.info(getMarker(), "Reading target file list"); + List fileNames = Arrays.asList(client.listNames()); + logger.info(getMarker(), "Target file list reading completed, mediabase size is {}", fileNames.size()); + String title = targetFileName.replace(".mxf", ".lxf"); + boolean contains = fileNames.contains(title); + if (contains) { + logger.info(getMarker(), "File already exists {} on {}", title, getManager().getStore(targetStoreUri.getStoreId()).getName()); + return null; + } + } catch (Exception e) { + logger.catching(e); + } finally { + targetStoreUri.cleanUp(); + } +*/ + return super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } +} diff --git a/server/-product/production/AMC/jobs/steps/NEXIO2TransferFromStep.java b/server/-product/production/AMC/jobs/steps/NEXIO2TransferFromStep.java new file mode 100644 index 00000000..a698c6e8 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/NEXIO2TransferFromStep.java @@ -0,0 +1,30 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.StoreUri; + +public class NEXIO2TransferFromStep extends TransferStep { + private static final Logger logger = LogManager.getLogger(); + + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + Object[] result = null; + try { + Path targetFile = Paths.get(targetStoreUri.toString(true), targetFileName); + if (targetFile.toFile().exists()) { + logger.info(getMarker(), "Using previously retrived file {}", targetFile); + } else { + result = super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } + } catch (Exception e) { + logger.error(getMarker(), e.getMessage()); + } + return result; + } +} diff --git a/server/-product/production/AMC/jobs/steps/NEXIO2TransferToStep.java b/server/-product/production/AMC/jobs/steps/NEXIO2TransferToStep.java new file mode 100644 index 00000000..20c81a68 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/NEXIO2TransferToStep.java @@ -0,0 +1,53 @@ +package user.jobengine.server.steps; + +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.net.ftp.FTPClient; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.StoreUri; +import user.commons.remotestore.FtpDirectoryLister; + +public class NEXIO2TransferToStep extends TransferStep { + private static final Logger logger = LogManager.getLogger(); + + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + // try { + // String title = targetFileName; + // if (title.contains(".")) + // title = title.substring(0, title.lastIndexOf(".")); + // RemoteFile remoteFile = targetStoreUri.getFileWithContent(title + ".xml"); + // if (remoteFile != null && remoteFile.getContent() != null) { + // logger.info("File already exists on NEXIO2 {}", targetFileName); + // return null; + // } + // } catch (Exception e) { + // logger.error(e.getMessage()); + // } finally { + // targetStoreUri.cleanUp(); + // } +/* + try { + FTPClient client = ((FtpDirectoryLister) targetStoreUri.getLister()).connect(); + logger.info(getMarker(), "Reading target file list"); + List fileNames = Arrays.asList(client.listNames()); + logger.info(getMarker(), "Target file list reading completed, mediabase size is {}", fileNames.size()); + String title = targetFileName.replace(".mxf", ".lxf"); + boolean contains = fileNames.contains(title); + if (contains) { + logger.info(getMarker(), "File already exists {} on {}", title, getManager().getStore(targetStoreUri.getStoreId()).getName()); + return null; + } + } catch (Exception e) { + logger.catching(e); + } finally { + targetStoreUri.cleanUp(); + } +*/ + return super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } +} diff --git a/server/-product/production/AMC/jobs/steps/NEXIOArchiveCheckerStep.java b/server/-product/production/AMC/jobs/steps/NEXIOArchiveCheckerStep.java new file mode 100644 index 00000000..8beafb23 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/NEXIOArchiveCheckerStep.java @@ -0,0 +1,187 @@ +package user.jobengine.server.steps; + +import java.io.IOException; +import java.nio.file.Paths; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.time.Duration; +import java.time.Instant; +import java.util.Iterator; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.DownloadableMedia; +import user.commons.StoreUri; +import user.commons.nexio.api.Clip; +import user.commons.nexio.api.ClipNotFoundException; +import user.commons.nexio.api.Controller; +import user.commons.nexio.api.Mediabase; +import user.commons.nexio.server.protocol.ProtocolException; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Media; +import user.jobengine.db.MediaFile; + +public class NEXIOArchiveCheckerStep extends JobStep { + private static final String DOT_MXF = ".mxf"; + private static final Logger logger = LogManager.getLogger(); + private SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss"); + + private boolean check(Timestamp modified, Timestamp created, int duration, Media media, int videoFormat, int lastModifiedHours) { + String title = media.getTitle(); + + //formatum + if (!(videoFormat == 3 || videoFormat == 19)) { + logger.debug(getMarker(), "{} unsupported video format", videoFormat); + return false; + } + + if (!checkModifiedByTime(title, modified, lastModifiedHours)) + return false; + + //utolso modositas + MediaFile mediaFile = getManager().getSystemMediaFile(media); + boolean isModified = true; + if (mediaFile == null) { + logger.info(getMarker(), "{} system media file not available", title); + return false; + } + + String mcMod = df.format(mediaFile.getLastModified()); + String nexioMod = df.format(modified); + isModified = mcMod.compareTo(nexioMod) < 0; + if (isModified) { + logger.info(getMarker(), "{} modification time: MC {} < NEXIO {}", title, mcMod, nexioMod); + return true; + } + + boolean isLengthChanged = media.getLength() > 0 && Math.abs(media.getLength() - duration) > 3; + if (isLengthChanged) { + logger.info(getMarker(), "{} length: MC {} != NEXIO {}", title, media.getLength(), duration); + return true; + } + + return false; + } + + private boolean checkModifiedByTime(String title, Timestamp modified, int lastModifiedHours) { + //utolso modositas a mosthoz kepest + //The result of this method can be a negative period if the end is before the start. + long modifiedHours = Duration.between(modified.toInstant(), Instant.now()).toHours(); + if (modifiedHours < 0) { + logger.info(getMarker(), "{} modification time greather than now", title); + return false; + } + if (modifiedHours < lastModifiedHours) { + logger.debug(getMarker(), "{} modification time is too cloose for now", title); + return false; + } + + return true; + } + + @StepEntry + public Object[] execute(String sourceStoreName, String escortStoreName, int lastModifiedHours) throws Exception { + Controller controller = null; + + try { + getJobRuntime().setRelated(sourceStoreName + " archive"); + + StoreUri nexioStoreUri = getManager().getStoreUri(sourceStoreName, RemoteStoreProtocol.NEXIO); + StoreUri sourceStoreUri = getManager().getStoreUri(sourceStoreName, RemoteStoreProtocol.FTP); + StoreUri targetStoreUri = getManager().getStoreUri("TSM", RemoteStoreProtocol.TSM); + StoreUri escortStoreUri = getManager().getStoreUri(escortStoreName, RemoteStoreProtocol.LOCAL); + String outputPath = Paths.get(escortStoreUri.toString(true)).toString(); + + logger.info(getMarker(), "Connecting mediabase {}", nexioStoreUri.toString()); + if (nexioStoreUri.getPortNumber() == 0) + controller = new Controller(nexioStoreUri.getUri(), nexioStoreUri.getPortNumber()); + else + controller = new Controller(nexioStoreUri.getUri()); + controller.connect(); + Mediabase mediabase = controller.getMediabase(); + + Iterator clips = mediabase.getClips(); + logger.info(getMarker(), "Processing clips"); + + processClips(sourceStoreName, sourceStoreUri, targetStoreUri, outputPath, clips, lastModifiedHours); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage() == null ? "Unknown error" : e.getMessage()); + throw e; + } finally { + setProgress(100); + if (controller != null) + controller.disconnect(); + } + + return null; + } + + private void processClips(String storeName, StoreUri sourceStoreUri, StoreUri targetStoreUri, String outputPath, Iterator clips, + int lastModifiedHours) throws ClipNotFoundException, IOException, ProtocolException { + int processed = 0; + while (clips.hasNext()) { + + if (getJobRuntime().isWaitingCancel()) { + cancel(); + break; + } + + Clip clip = clips.next(); + + try { + String title = null; + Timestamp created = null; + Timestamp modified = null; + int frames = 0; + int videoFormat = 0; + frames = clip.getDuration(); + + //ures clip + if (frames == 1) + continue; + + title = clip.getXid().get(); + created = Timestamp.from(clip.getRecordDateTimestamp().toInstant()); + modified = Timestamp.from(clip.getModifiedTimestamp().toInstant()); + videoFormat = clip.getVideoFormat(); + + Media media = getManager().getMedia(title); + logger.debug(getMarker(), "Checking {}", title); + boolean createEscort = false; + + long mediaId = 0; + if (media == null) { + if (checkModifiedByTime(title, modified, lastModifiedHours)) { + createEscort = true; + logger.info(getMarker(), "{} not archived yet", title); + } + } else { + mediaId = media.getId(); + createEscort = check(modified, created, frames, media, videoFormat, lastModifiedHours); + } + + if (createEscort && !title.contains("*")) { + String fileName = title + DOT_MXF; + DownloadableMedia downloadable = DownloadableMedia.create(title, fileName, modified, created, frames, 0, sourceStoreUri.getId(), + targetStoreUri.getId(), mediaId); + String escortFileName = storeName + "." + downloadable.getString("fileName"); + if (EscortFiles.createMetadataIfNotExists(outputPath, escortFileName, downloadable.toPrettyString(""))) { + logger.info(getMarker(), "Archive status file created for {}", fileName); + } else { + logger.info(getMarker(), "Archive status file already exists for {}", fileName); + } + + } + + processed++; + if (processed % 100 == 0) + logger.info(getMarker(), "Processed {} records", processed); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + continue; + } + } + } + +} diff --git a/server/-product/production/AMC/jobs/steps/NEXIOMetadataPersisterStep.java b/server/-product/production/AMC/jobs/steps/NEXIOMetadataPersisterStep.java new file mode 100644 index 00000000..ec9565f1 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/NEXIOMetadataPersisterStep.java @@ -0,0 +1,109 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.sql.Timestamp; +import java.text.SimpleDateFormat; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import user.commons.DownloadableMedia; +import user.commons.RemoteFile; +import user.commons.StoreUri; +import user.jobengine.db.Media; +import user.jobengine.db.MediaFile; + +public class NEXIOMetadataPersisterStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + private static final String DOT_XML = ".xml"; + + @StepEntry + public Object[] execute(StoreUri targetStoreUri, String escortFile) throws Exception { + try { + Path escortFilePath = Paths.get(escortFile); + if (!escortFilePath.toFile().exists()) { + logger.error(getMarker(), "Status file does not exists {}", escortFilePath); + return null; + } + + DownloadableMedia downloadable = EscortFiles.decode(escortFilePath); + if (!downloadable.containsKey("isNexio") || !downloadable.getBoolean("isNexio")) + return null; + + if (!downloadable.containsKey("mediaId")) + throw new NullPointerException("No media ID found for " + downloadable.getString("title")); + + Media media = getManager().getMedia(downloadable.getLong("mediaId")); + MediaFile mediaFile = getManager().getSystemMediaFile(media); + if (mediaFile == null) + throw new NullPointerException("No TSM media file found for " + downloadable.getString("title")); + + RemoteFile remoteFile = targetStoreUri.getFileWithContent(downloadable.getString("title") + ".xml"); + + //TODO mediafile lastmodified = feltoltott file nexio xml lastmodified + Timestamp lastModified = getLastModified(remoteFile); + logger.info("Setting last modification time on {} to {}", downloadable.getString("title"), lastModified); + mediaFile.setLastModified(lastModified); + getManager().modify(mediaFile); + + // if (!RemoteStoreProtocol.FTP.equals(targetStoreUri.getProtocol())) + // return null; + + // + // String title = downloadable.getString("title"); + // String fileName = downloadable.getString("fileName"); + // Date created = downloadable.getDate("created"); + // Date modified = downloadable.getDate("modified"); + // byte[] metadata = EscortFiles.createNEXIODatesMeta(title, created, modified); + // uploadMeta(targetStoreUri, fileName, metadata); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } finally { + if (targetStoreUri != null) + targetStoreUri.cleanUp(); + } + return null; + } + + private Timestamp getLastModified(RemoteFile remoteFile) throws Exception { + Timestamp result = null; + Document document = EscortFiles.createNEXIOMeta(remoteFile.getContent()); + Node firstChild = document.getFirstChild(); + NodeList list = firstChild.getChildNodes(); + for (int i = 0; i < list.getLength(); i++) { + Node item = list.item(i); + if (item.getNodeName().equals("ModifiedTimeStamp")) { + SimpleDateFormat df = new SimpleDateFormat("MM-dd-yyyy (HH:mm:ss)"); + result = Timestamp.from(df.parse(item.getTextContent()).toInstant()); + break; + } + } + return result; + } + + // private void uploadMeta(StoreUri storeUri, String fileName, byte[] metadata) throws Exception { + // logger.info(getMarker(), "Uploading metadata for {}", fileName); + // OutputStream outStream = null; + // try { + // FTPClient sourceFtp = ((FtpDirectoryLister) storeUri.getLister()).connect(); + // outStream = sourceFtp.storeFileStream(fileName + DOT_XML); + // if (outStream == null) + // throw new NullPointerException("Can not create: " + fileName + DOT_XML + " on FTP. Reply is:" + sourceFtp.getReplyString()); + // outStream.write(metadata); + // outStream.flush(); + // } catch (Exception e) { + // logger.catching(e); + // throw e; + // } finally { + // if (outStream != null) + // outStream.close(); + // storeUri.cleanUp(); + // } + // } + +} diff --git a/server/-product/production/AMC/jobs/steps/PASAPOOLTransferToStep.java b/server/-product/production/AMC/jobs/steps/PASAPOOLTransferToStep.java new file mode 100644 index 00000000..dfe2825d --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/PASAPOOLTransferToStep.java @@ -0,0 +1,154 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.commons.io.FileUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.Marker; +import org.apache.logging.log4j.MarkerManager; + +import user.commons.RemoteFile; +import user.commons.StoreUri; +import user.commons.mediatool.MediaInfo; + +public class PASAPOOLTransferToStep extends TransferStep { + private static final Logger logger = LogManager.getLogger(); + private static final String CODEC_PROFILE_HIGH = "HIGH"; + private static final String CODEC_PROFILE_MAIN = "MAIN"; + private static final String CODEC_PROFILE_422 = "4:2:2"; + private static final String DISPLAY_ASPECT_16_9 = "16:9"; + private static final String DISPLAY_ASPECT_4_3 = "4:3"; + private StoreUri sourceStoreUri; + private String sourceFileName; + + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + this.sourceStoreUri = sourceStoreUri; + this.sourceFileName = sourceFileName; + logMediaProfile(); + long start = System.currentTimeMillis(); + Object[] result = super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + RemoteFile remoteFile = sourceStoreUri.getRemoteFile(targetFileName); + if (remoteFile != null && remoteFile.getSize() > 0) { + long diff = (System.currentTimeMillis() - start) / 1000; + if (diff > 0) { + long bytesSpeed = remoteFile.getSize() / diff; + String speed = FileUtils.byteCountToDisplaySize(bytesSpeed); + logger.info(getMarker(), "{} size is {}, upload speed was {}/sec", targetFileName, FileUtils.byteCountToDisplaySize(remoteFile.getSize()), speed); + } + } + return result; + } + + // HD + // height = 1080 + // >PEABLEBEACH | \\10.170.100.21\media\BeachPool + private boolean isHD(MediaInfo mi) { + return mi.getHeight() == 1080; + } + + // @Override + // protected StoreUri getTargetStoreUri() { + // StoreUri result = null; + // try { + // Path filePath = Paths.get(sourceStoreUri.toString(true), sourceFileName); + // MediaInfo mi = new MediaInfo(filePath); + // mi.process(); + // + // if (isHD(mi)) { + // result = getManager().getStoreUri("PEABLEBEACH", targetStoreUri.getProtocol()); + // return result; + // } + // + // if (isSD_HIGH_16_9(mi)) { + // result = getManager().getStoreUri("SELENIOPOOL_16_9", targetStoreUri.getProtocol()); + // return result; + // } + // + // if (isSD_HIGH_4_3(mi)) { + // result = getManager().getStoreUri("SELENIOPOOL_4_3", targetStoreUri.getProtocol()); + // return result; + // } + // + // if (isSD_MAIN_422(mi)) { + // result = getManager().getStoreUri("PEABLEBEACH", targetStoreUri.getProtocol()); + // return result; + // } + // } catch (Exception e) { + // logger.error(getSessionMarker(), e.getMessage()); + // result = targetStoreUri; + // } + // return result; + // } + + // SD - HIGH@HIGH / 16:9 + // height < 650 + // profile=High + // aspect=16:9 + // >SELENIOPOOL_16_9 | \\10.170.100.21\media\SelenioPool\16_9 + private boolean isSD_HIGH_16_9(MediaInfo mi) { + String codecProfileName = mi.getCodecProfileName(); + if (codecProfileName != null) + codecProfileName = codecProfileName.toUpperCase(); + return mi.getHeight() < 650 && CODEC_PROFILE_HIGH.equals(codecProfileName) && DISPLAY_ASPECT_16_9.equals(mi.getDisplayAspect()); + } + + // SD - HIGH@HIGH / 4:3 + // height < 650 + // profile=High + // aspect=4:3 + // >SELENIOPOOL_4_3 | \\10.170.100.21\media\SelenioPool\4_3 + private boolean isSD_HIGH_4_3(MediaInfo mi) { + String codecProfileName = mi.getCodecProfileName(); + if (codecProfileName != null) + codecProfileName = codecProfileName.toUpperCase(); + return mi.getHeight() < 650 && CODEC_PROFILE_HIGH.equals(codecProfileName) && DISPLAY_ASPECT_4_3.equals(mi.getDisplayAspect()); + } + + // SD - MAIN/422@HIGH + // height < 650 + // profile=Main || profile=4:2:2 + // >PEABLEBEACH | \\10.170.100.21\media\BeachPool + private boolean isSD_MAIN_422(MediaInfo mi) { + String codecProfileName = mi.getCodecProfileName(); + if (codecProfileName != null) + codecProfileName = codecProfileName.toUpperCase(); + return mi.getHeight() < 650 && (CODEC_PROFILE_MAIN.equals(codecProfileName) || CODEC_PROFILE_422.equals(codecProfileName)); + } + + protected void logMediaProfile() { + Marker marker = MarkerManager.getMarker("MEDIAPROFILE"); + try { + Path filePath = Paths.get(sourceStoreUri.toString(true), sourceFileName); + MediaInfo mi = new MediaInfo(filePath); + mi.process(); + logger.info(marker, "{} data : {} {} {}", sourceFileName, mi.getCodecProfileName(), mi.getHeight(), mi.getDisplayAspect()); + + if (isHD(mi)) { + logger.info(marker, "{} is HD", sourceFileName); + return; + } + + if (isSD_HIGH_16_9(mi)) { + logger.info(marker, "{} is SD_HIGH_16_9", sourceFileName); + return; + } + + if (isSD_HIGH_4_3(mi)) { + logger.info(marker, "{} is SD_HIGH_4_3", sourceFileName); + return; + } + + if (isSD_MAIN_422(mi)) { + logger.info(marker, "{} is SD_MAIN_422", sourceFileName); + return; + } + } catch (Exception e) { + logger.error(marker, e.getMessage()); + } + } + +} diff --git a/server/-product/production/AMC/jobs/steps/PBQuery.java b/server/-product/production/AMC/jobs/steps/PBQuery.java new file mode 100644 index 00000000..458b1375 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/PBQuery.java @@ -0,0 +1,326 @@ +package user.jobengine.server.steps; + +import java.io.DataInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.StringReader; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import org.apache.commons.lang.StringUtils; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.params.BasicHttpParams; +import org.apache.http.params.HttpConnectionParams; +import org.apache.http.params.HttpParams; +import org.apache.http.protocol.HTTP; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; + +public class PBQuery { + public class MMMedia { + private final String name; + private final String usage; + + MMMedia(String name, String usage) { + this.name = name; + this.usage = usage; + + } + + public String getName() { + return name; + } + + public String getUsage() { + return usage; + } + } + + private static final Logger logger = LogManager.getLogger(); + private static final int CONNECTION_TIMEOUT = 5000; + private static final int SOCKET_TIMEOUT = 5000; + public static final String GETMEDIAUSAGEBYUTRANGE = "/getMediaUsageByUTRange"; + public static final String GETCUSTOMVIEW = "/getCustomView"; + + public static final String SOAP_TEMPLATE_ROOT = System.getProperty("jobengine.soap.template.root", "/opt/mediacube/configuration/soap"); + + private static Document toDocument(String xml) { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = null; + try { + builder = factory.newDocumentBuilder(); + Document doc = builder.parse(new InputSource(new StringReader(xml))); + return doc; + } catch (Exception e) { + logger.error(e.getMessage()); + } + return null; + } + + private SimpleDateFormat sdf_range = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss:'00'"); + private String primaryEndPoint; + private String primaryUserName; + private String primaryPassword; + private String secondaryEndPoint; + private String secondaryUserName; + + private String secondaryPassword; + + private int rangeForwardHours; + + private String getAttribute(Node node, String name) { + String result = null; + if (node != null && node.hasAttributes()) { + NamedNodeMap attributes = node.getAttributes(); + if (attributes != null) { + Node mediaNameNode = attributes.getNamedItem(name); + if (mediaNameNode != null) + result = mediaNameNode.getNodeValue(); + } + } + return result; + } + + public Collection getPossibelMissingMaterialNames(List poolContent) throws Exception { + Map result = querySortableMedias(poolContent); + queryOtherMedias(poolContent, result); + + TreeMap sortedUsages = new TreeMap<>(); + for (MMMedia m : result.values()) { + //a TreeMap lehetove teszi: nincs duplikatum + a korabbi musorok elore kerulnek + sortedUsages.put(m.getUsage() + "." + m.getName(), m); + } + + return sortedUsages.values(); + + } + + public void init(String primaryEndPoint, String primaryUserName, String primaryPassword, String secondaryEndPoint, String secondaryUserName, + String secondaryPassword, int rangeForwardHours) throws Exception { + this.primaryEndPoint = primaryEndPoint; + this.primaryUserName = primaryUserName; + this.primaryPassword = primaryPassword; + this.secondaryEndPoint = secondaryEndPoint; + this.secondaryUserName = secondaryUserName; + this.secondaryPassword = secondaryPassword; + this.rangeForwardHours = rangeForwardHours; + } + + private void putEarliest(Map result, String mediaName, String usageTime) { + if (result.containsKey(mediaName)) { + MMMedia m = result.get(mediaName); + //az aktualis a korabbi idopont + if (usageTime.compareTo(m.getUsage()) < 0) + result.put(mediaName, new MMMedia(mediaName, usageTime)); + } else + result.put(mediaName, new MMMedia(mediaName, usageTime)); + } + + public String query(String endPoint, String action, String soap, String user, String pwd) throws Exception { + + HttpParams httpParameters = new BasicHttpParams(); + HttpConnectionParams.setConnectionTimeout(httpParameters, CONNECTION_TIMEOUT); + HttpConnectionParams.setSoTimeout(httpParameters, SOCKET_TIMEOUT); + DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters); + //http://10.170.100.61:18083 + + String result = null; + DataInputStream is = null; + try { + URL url = new URL(endPoint); + httpclient.getCredentialsProvider().setCredentials(new AuthScope(url.getHost(), url.getPort(), null, "Digest"), + new UsernamePasswordCredentials(user, pwd)); + + HttpPost httppost = new HttpPost(url.toURI()); + httppost.setHeader("soapaction", action); + //Content-Type application/soap+xml; charset=utf-8; action="/getMediaUsageByUTRange" + httppost.setHeader("Content-Type", "text/xml; charset=utf-8"); + HttpEntity entity = new StringEntity(soap.toString(), HTTP.UTF_8); + httppost.setEntity(entity); + logger.info("Executing call {}", action); + HttpResponse response = httpclient.execute(httppost);// calling server + HttpEntity r_entity = response.getEntity(); //get response + // Header[] headers = response.getAllHeaders(); + // for (Header h : headers) { + // logger.info("Reponse Header", h.getName() + ": " + h.getValue()); + // } + if (r_entity != null) { + byte[] bytes = new byte[(int) r_entity.getContentLength()]; + if (r_entity.isStreaming()) { + is = new DataInputStream(r_entity.getContent()); + is.readFully(bytes); + } + result = new String(bytes); + } + } catch (Exception e) { + logger.error("Exception while connecting to endpoint {}. System message is: {}", e.getMessage()); + throw e; + } finally { + if (is != null) { + try { + is.close(); + } catch (IOException e) { + } + } + if (httpclient != null) { + httpclient.getConnectionManager().shutdown(); + } + } + + return result; + } + + public void queryOtherMedias(List poolContent, Map result) throws Exception { + String xml = null; + String soap = null; + Path template = Paths.get(SOAP_TEMPLATE_ROOT, GETCUSTOMVIEW); + + if (!template.toFile().exists()) + throw new FileNotFoundException(template.toString()); + try { + soap = new String(Files.readAllBytes(template)); + xml = query(primaryEndPoint, GETCUSTOMVIEW, soap, primaryUserName, primaryPassword); + } catch (Exception e1) { + try { + xml = query(secondaryEndPoint, GETCUSTOMVIEW, soap, secondaryUserName, secondaryPassword); + } catch (Exception e2) { + } + } + + if (StringUtils.isBlank(xml)) { + logger.info("Query result is empty"); + return; + } + + Document document = toDocument(xml); + NodeList mediaNodes = document.getElementsByTagName("media"); + + if (mediaNodes == null || mediaNodes.getLength() == 0) + return; + + for (int i = 0; i < mediaNodes.getLength(); i++) { + Node mediaNode = mediaNodes.item(i); + String mediaName = getAttribute(mediaNode, "mediaName"); + if (StringUtils.isBlank(mediaName)) { + logger.info("Missing mediaName"); + continue; + } + + if (poolContent.contains(mediaName)) + continue; + + String usageTime = getAttribute(mediaNode, "earliestUsageTime"); + putEarliest(result, mediaName, usageTime); + } + + logger.info("Document done, items {}", mediaNodes.getLength()); + + } + + public Map querySortableMedias(List poolContent) throws Exception { + Map result = new HashMap<>(); + + String xml = null; + String soap = null; + + Path template = Paths.get(SOAP_TEMPLATE_ROOT, GETMEDIAUSAGEBYUTRANGE); + if (!template.toFile().exists()) + throw new FileNotFoundException(template.toString()); + + try { + long now = System.currentTimeMillis(); + Calendar cal = Calendar.getInstance(); + cal.setTimeInMillis(now); + cal.add(Calendar.HOUR_OF_DAY, rangeForwardHours); + + String fromDateStr = sdf_range.format(new Date(now)); + String toDateStr = sdf_range.format(cal.getTime()); + + soap = new String(Files.readAllBytes(template)); + soap = soap.replace("{start}", fromDateStr); + soap = soap.replace("{end}", toDateStr); + + xml = query(primaryEndPoint, GETMEDIAUSAGEBYUTRANGE, soap, primaryUserName, primaryPassword); + } catch (Exception e1) { + try { + xml = query(secondaryEndPoint, GETMEDIAUSAGEBYUTRANGE, soap, secondaryUserName, secondaryPassword); + } catch (Exception e2) { + } + } + + if (StringUtils.isBlank(xml)) { + logger.info("Query result is empty"); + return result; + } + + Document document = toDocument(xml); + NodeList mediaNodes = document.getElementsByTagName("mediaUsage"); + + if (mediaNodes == null || mediaNodes.getLength() == 0) + return result; + + for (int i = 0; i < mediaNodes.getLength(); i++) { + Node mediaNode = mediaNodes.item(i); + String mediaName = getAttribute(mediaNode, "mediaName"); + String mediaType = getAttribute(mediaNode, "mediaType"); + if (StringUtils.isBlank(mediaName)) { + logger.info("Missing mediaName"); + continue; + } + + if (!StringUtils.equals("Video", mediaType)) { + continue; + } + + if (poolContent.contains(mediaName)) + continue; + + Node usageChild = mediaNode.getFirstChild(); + if (usageChild == null) { + logger.info("Skipping {}, no media usage defined", mediaName); + continue; + } + + NodeList usageNodes = usageChild.getChildNodes(); + if (usageNodes == null || usageNodes.getLength() == 0) { + logger.info("Skipping {}, no media usage defined", mediaName); + continue; + } + + for (int j = 0; j < usageNodes.getLength(); j++) { + Node mediaUsageNode = usageNodes.item(j); + String usageTime = getAttribute(mediaUsageNode, "earliestUsageTime"); + logger.info("{}, {}", mediaName, usageTime); + putEarliest(result, mediaName, usageTime); + } + + } + + return result; + } + +} diff --git a/server/-product/production/AMC/jobs/steps/PeableBeachMissingMaterialCheckerStep.java b/server/-product/production/AMC/jobs/steps/PeableBeachMissingMaterialCheckerStep.java new file mode 100644 index 00000000..74a80b51 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/PeableBeachMissingMaterialCheckerStep.java @@ -0,0 +1,225 @@ +package user.jobengine.server.steps; + +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.net.ftp.FTPClient; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.ibm.nosql.json.api.BasicDBList; + +import user.commons.DownloadableMedia; +import user.commons.StoreUri; +import user.commons.remotestore.FtpDirectoryLister; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Media; +import user.jobengine.server.steps.PBQuery.MMMedia; + +public class PeableBeachMissingMaterialCheckerStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + private static final String appendExtension = System.getProperty("missingmaterial.appendextension", ".mxf"); + + @StepEntry + public Object[] execute(String escortStoreName, BasicDBList lookupStoreNames, String targetStoreName, String targetProtocol, String primaryEndPoint, + String primaryUserName, String primaryPassword, String secondaryEndPoint, String secondaryUserName, String secondaryPassword, int rangeForwardHours) + throws Exception { + StoreUri escortStoreUri = null; + try { + getJobRuntime().setRelated(targetStoreName + " restore"); + + escortStoreUri = getManager().getStoreUri(escortStoreName, RemoteStoreProtocol.LOCAL); + StoreUri sourceStoreUri = getManager().getStoreUri("TSM", RemoteStoreProtocol.TSM); + StoreUri targetStoreUri = getManager().getStoreUri(targetStoreName, Enum.valueOf(RemoteStoreProtocol.class, targetProtocol)); + + LinkedHashSet poolContent = new LinkedHashSet<>(); + + int progress = 0; + int count = lookupStoreNames.size(); + int processed = 0; + + for (Object lookup : lookupStoreNames) { + if (getJobRuntime().isWaitingCancel()) { + cancel(); + return null; + } + String lookupStoreName = String.valueOf(lookup); + + StoreUri lookupStoreUri = getManager().getStoreUri(lookupStoreName, Enum.valueOf(RemoteStoreProtocol.class, targetProtocol)); + logger.info(getMarker(), "Checking pool {}", lookupStoreName); + List lookupContent = getPoolContent(lookupStoreName, lookupStoreUri); + poolContent.addAll(lookupContent); + processed++; + progress = processed * 50 / count; + setProgress(progress); + } + /* + if (1 == 1) { + + logger.info(getMarker(), "Kikapcsolva"); + return null; + } + */ + + PBQuery query = new PBQuery(); + query.init(primaryEndPoint, primaryUserName, primaryPassword, secondaryEndPoint, secondaryUserName, secondaryPassword, rangeForwardHours); + Collection medias = query.getPossibelMissingMaterialNames(new ArrayList<>(poolContent)); + logger.info(getMarker(), "API returned {} items", medias == null ? 0 : medias.size()); + + if (medias != null && medias.size() > 0) { + count = medias.size(); + for (MMMedia media : medias) { + logger.info(getMarker(), "API response contains {}", media.getName()); + } + + for (MMMedia media : medias) { + if (getJobRuntime().isWaitingCancel()) { + cancel(); + break; + } + processRecord(media, sourceStoreUri, targetStoreName, targetStoreUri, escortStoreUri); + processed++; + progress = 50 + (processed * 50 / count); + setProgress(progress); + } + + } + setProgress(100); + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } finally { + if (escortStoreUri != null) + escortStoreUri.cleanUp(); + } + + return null; + } + + private List getPoolContent(String storeName, StoreUri targetStoreUri) throws Exception { + List poolContent = new ArrayList<>(); + + FtpDirectoryLister lister = (FtpDirectoryLister) targetStoreUri.getLister(); + FTPClient client = lister.connect(); + logger.info(getMarker(), "Working dir is {}", client.printWorkingDirectory()); + String[] listNames = client.listNames(); + targetStoreUri.cleanUp(); + + if (listNames != null) { + List remoteFileNames = Arrays.asList(listNames); + logger.info(getMarker(), "Remote file list size :{}", remoteFileNames.size()); + for (String name : remoteFileNames) { + try { + if (name.toLowerCase().endsWith(".mxf")) { + int pos = name.lastIndexOf("."); + if (pos > -1) { + name = name.substring(0, pos); + //logger.info(getMarker(), "Adding {}", name); + poolContent.add(name); + } + } + } catch (Exception e) { + logger.error(e.getMessage()); + } + + } + } + + // List remoteFiles = targetStoreUri.getRemoteFiles(); + // if (remoteFiles != null) { + // logger.info(getMarker(), "Remote file list size :{}", remoteFiles.size()); + // for (RemoteFile rf : remoteFiles) { + // try { + // String name = rf.getName(); + // if (name.toLowerCase().endsWith(".mxf")) { + // int pos = name.lastIndexOf("."); + // if (pos > -1) { + // name = name.substring(0, pos); + // //logger.info(getMarker(), "Adding {}", name); + // poolContent.add(name); + // } + // } + // } catch (Exception e) { + // logger.error(e.getMessage()); + // } + // + // } + // } + logger.info(getMarker(), "Pool {} contains {} items", storeName, poolContent == null ? 0 : poolContent.size()); + return poolContent; + } + + //csak visszaterunk + private String normalizeName(String mediaName) { + String result = mediaName; + if (StringUtils.isNotBlank(appendExtension)) + result += appendExtension; + // if (StringUtils.isNotBlank(mediaName)) { + // result = mediaName.trim().toLowerCase(); + // } + return result; + } + + private void processRecord(MMMedia mmedia, StoreUri sourceStoreUri, String targetStoreName, StoreUri targetStoreUri, StoreUri escortStoreUri) { + //TODO kisbetu/nagybetu problema kezelese + + Media media = null; + //duplikatum miatt + try { + media = getManager().getMedia(mmedia.getName()); + } catch (Exception e) { + logger.error(getMarker(), "Can't identify missing material {}. System message is: {}", mmedia.getName(), e.getMessage()); + return; + } + + String fileName = normalizeName(mmedia.getName()); + + if (media == null) { + logger.error(getMarker(), "File {} not archived yet", mmedia.getName()); + return; + } + + DownloadableMedia downloadable = DownloadableMedia.create(mmedia.getName(), fileName, media.getModified(), media.getCreated(), media.getLength(), 0L, + sourceStoreUri.getId(), targetStoreUri.getId(), media.getId()); + downloadable.put("priority", 50); + String usage = mmedia.getUsage(); + usage = usage.replace("-", "").replace(":", ""); + String escortFileName = usage + "." + targetStoreName + "." + fileName; + Path outputPath = null; + try { + outputPath = Paths.get(escortStoreUri.toString(true)); + boolean exsists = statusFileExists(outputPath, fileName); + if (exsists) + return; + EscortFiles.createMetadata(outputPath.toString(), escortFileName, downloadable.toPrettyString("")); + logger.info(getMarker(), "Status file created {}", escortFileName); + } catch (Exception e) { + logger.error(getSessionMarker(), "Can't create status file {}", Paths.get(outputPath.toString(), escortFileName)); + } + + } + + private boolean statusFileExists(Path outputPath, String fileName) { + boolean exsists = false; + Path statusPath = Paths.get(outputPath.toString(), EscortFiles.STATUSFOLDER); + try (DirectoryStream p = Files.newDirectoryStream(statusPath, "*" + fileName + EscortFiles.DOT_JSON)) { + if (p.iterator().hasNext()) { + logger.info(getMarker(), "Status file for {} already exists", fileName); + exsists = true; + } + + } catch (Exception e1) { + logger.error(getSessionMarker(), e1.getMessage()); + } + return exsists; + } + +} diff --git a/server/-product/production/AMC/jobs/steps/RegisterUserRestoreStep.java b/server/-product/production/AMC/jobs/steps/RegisterUserRestoreStep.java new file mode 100644 index 00000000..ba23e3f6 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/RegisterUserRestoreStep.java @@ -0,0 +1,71 @@ +package user.jobengine.server.steps; + +import java.nio.file.Paths; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.DownloadableMedia; +import user.commons.StoreUri; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.ArchivedMedia; +import user.jobengine.db.Media; + +public class RegisterUserRestoreStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + private static final String appendExtension = System.getProperty("missingmaterial.appendextension", ".mxf"); + + @StepEntry + public Object[] execute(String escortStoreName, String targetStoreName, List basket, String recipient) throws Exception { + StoreUri escortStoreUri = null; + try { + escortStoreUri = getManager().getStoreUri(escortStoreName, RemoteStoreProtocol.LOCAL); + StoreUri targetStoreUri = getManager().getStore(targetStoreName).getTargetStoreUri(); + StoreUri sourceStoreUri = getManager().getStoreUri("TSM", RemoteStoreProtocol.TSM); + int processed = 0; + for (ArchivedMedia media : basket) { + processRecord(media, targetStoreName, sourceStoreUri, targetStoreUri, escortStoreUri, recipient); + processed++; + int progress = processed * 100 / basket.size(); + setProgress(progress); + } + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } finally { + if (escortStoreUri != null) + escortStoreUri.cleanUp(); + } + + return null; + } + + private void processRecord(ArchivedMedia archivedMedia, String targetStoreName, StoreUri sourceStoreUri, StoreUri targetStoreUri, StoreUri escortStoreUri, + String recipient) { + Media media = archivedMedia.getMedia(); + + String fileName = media.getTitle(); + if (StringUtils.isNotBlank(appendExtension)) + fileName += appendExtension; + + DownloadableMedia downloadable = DownloadableMedia.create(media.getTitle(), fileName, media.getModified(), media.getCreated(), media.getLength(), 0L, + sourceStoreUri.getId(), targetStoreUri.getId(), media.getId()); + downloadable.put("recipient", recipient); + downloadable.put("skipValidation", true); + String escortFileName = targetStoreName + "." + downloadable.getString("fileName"); + String outputPath = null; + try { + outputPath = Paths.get(escortStoreUri.toString(true)).toString(); + if (EscortFiles.createMetadataIfNotExists(outputPath, escortFileName, downloadable.toPrettyString(""))) + logger.info(getSessionMarker(), "Status file created {}", escortFileName); + else + logger.info(getSessionMarker(), "Status file already exists {}", escortFileName); + } catch (Exception e) { + logger.error("Can't create escort file {}", Paths.get(outputPath.toString(), escortFileName)); + } + + } + +} diff --git a/server/-product/production/AMC/jobs/steps/RegisterVODRestoreStep.java b/server/-product/production/AMC/jobs/steps/RegisterVODRestoreStep.java new file mode 100644 index 00000000..a7cb11f6 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/RegisterVODRestoreStep.java @@ -0,0 +1,79 @@ +package user.jobengine.server.steps; + +import java.nio.file.Paths; + +import org.apache.commons.lang.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.ibm.nosql.json.api.BasicDBList; +import com.ibm.nosql.json.api.BasicDBObject; + +import user.commons.DownloadableMedia; +import user.commons.StoreUri; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Media; + +public class RegisterVODRestoreStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + private static final String appendExtension = System.getProperty("missingmaterial.appendextension", ".mxf"); + + @StepEntry + public Object[] execute(String targetStoreName, BasicDBList basket) throws Exception { + try { + StoreUri sourceStoreUri = getManager().getStoreUri("TSM", RemoteStoreProtocol.TSM); + + StoreUri targetStoreUri = getManager().getStore(targetStoreName).getTargetStoreUri(); + StoreUri escortStoreUri = getManager().getStoreUri("MEDIACUBE_UPLOADS", RemoteStoreProtocol.LOCAL); + int processed = 0; + for (int i = 0; i < basket.size(); i++) { + BasicDBObject item = (BasicDBObject) basket.get(i); + //logger.info(item.toPrettyString()); + processRecord(targetStoreName, sourceStoreUri, targetStoreUri, escortStoreUri, item); + processed++; + int progress = processed * 100 / basket.size(); + setProgress(progress); + } + } catch (Exception e) { + logger.error(getSessionMarker(), e.getMessage()); + throw e; + } finally { + } + + return null; + } + + private void processRecord(String targetStoreName, StoreUri sourceStoreUri, StoreUri targetStoreUri, StoreUri escortStoreUri, BasicDBObject item) { + String mediaTitle = item.getString("title"); + String relativeTargetPath = item.getString("path"); + + Media media = getManager().getMedia(mediaTitle); + + if (media == null) { + logger.error("Media {} is not available", mediaTitle); + return; + } + + String fileName = media.getTitle(); + if (StringUtils.isNotBlank(appendExtension)) + fileName += appendExtension; + + DownloadableMedia downloadable = DownloadableMedia.create(media.getTitle(), fileName, media.getModified(), media.getCreated(), media.getLength(), 0L, + sourceStoreUri.getId(), targetStoreUri.getId(), media.getId()); + //downloadable.put("skipValidation", true); + downloadable.put("relativeTargetPath", relativeTargetPath); + String escortFileName = targetStoreName + "." + downloadable.getString("fileName"); + String outputPath = null; + try { + outputPath = Paths.get(escortStoreUri.toString(true)).toString(); + if (EscortFiles.createMetadataIfNotExists(outputPath, escortFileName, downloadable.toPrettyString(""))) + logger.info(getSessionMarker(), "Status file created {}", escortFileName); + else + logger.info(getSessionMarker(), "Status file already exists {}", escortFileName); + } catch (Exception e) { + logger.error("Can't create escort file {}", Paths.get(outputPath.toString(), escortFileName)); + } + + } + +} diff --git a/server/-product/production/AMC/jobs/steps/ServerStatusReportStep.java b/server/-product/production/AMC/jobs/steps/ServerStatusReportStep.java new file mode 100644 index 00000000..3ffc5e3c --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/ServerStatusReportStep.java @@ -0,0 +1,37 @@ +package user.jobengine.server.steps; + +import java.util.Map; +import java.util.Set; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.JobStatus; +import user.commons.MediaCubeMarker; +import user.jobengine.server.IJobEngine; +import user.jobengine.server.IJobRuntime; + +public class ServerStatusReportStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + + @StepEntry + public Object[] execute(String tempStoreName, String template, String expectedColorSpace, int limit) throws Exception { + IJobEngine engine = getEngine(); + int jobCount = 0; + StringBuilder sb = new StringBuilder(); + Map jobs = engine.getJobs(); + if (jobs != null) { + Set keys = jobs.keySet(); + jobCount = keys.size(); + for (Long key : keys) { + IJobRuntime runtime = jobs.get(key); + if (JobStatus.SUSPENDED.equals(runtime.getStatus())) + sb.append(runtime.getRelated() + " felfüggesztve: " + runtime.getDescription() + "
"); + } + } + MediaCubeMarker marker = new MediaCubeMarker(); + marker.setSubject(String.format("[%d db] AMC MediaCube feldolgozás", jobCount)); + logger.info(marker, sb.toString()); + return null; + } +} diff --git a/server/-product/production/AMC/jobs/steps/SyncSubtitlesStep.java b/server/-product/production/AMC/jobs/steps/SyncSubtitlesStep.java new file mode 100644 index 00000000..39c338c3 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/SyncSubtitlesStep.java @@ -0,0 +1,94 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.StoreUri; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Store; + +public class TransferStep extends JobStep { + private static final String DOT_PART = ".part"; + private static final Logger logger = LogManager.getLogger(); + private static final boolean simulateTransferToTSM = Boolean.parseBoolean(System.getProperty("test.simulate.transfer.tsm", "false")); + protected StoreUri targetStoreUri; + + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + try { + this.targetStoreUri = targetStoreUri; + getJobRuntime().setCancelable(false); + + Store sourceStore = getManager().getStore(sourceStoreUri.getStoreId()); + Store targetStore = getManager().getStore(targetStoreUri.getStoreId()); + + String description = String.format("%s -> %s : %s", sourceStore.getName(), targetStore.getName(), sourceFileName); + getJobRuntime().setDescription(description); + + //logger.info(getSessionMarker(), String.valueOf(isSimulateTSMWrite(sourceStoreUri, targetStoreUri))); + if (isSimulateTSMWrite(sourceStoreUri, targetStoreUri)) { + logger.info(getMarker(), "Skipping real TSM write of {} from {} to {}", sourceFileName, sourceStoreUri, targetStoreUri); + return null; + } + + sourceStoreUri.addProgressListener(e -> setProgress(e.getProgress())); + + this.targetStoreUri = getTargetStoreUri(); + tryCopy(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } catch (Exception e) { + logger.error(getMarker(), "Error in transfer of {} when copying from {} to {}.", sourceFileName, sourceStoreUri, targetStoreUri); + throw e; + // logger.error(getMarker(), "Error in transfer of {} when copying from {} to {}. Retrying after 3 seconds.", sourceFileName, sourceStoreUri, + // targetStoreUri); + + // try { + // Thread.sleep(3000); + // tryCopy(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + // } catch (Exception e1) { + // logger.error(getSessionMarker(), "Error in transfer of {} when copying from {} to {}. System message is: {}", sourceFileName, sourceStoreUri, + // targetStoreUri, e1.getMessage()); + // throw e1; + // } + } finally { + if (sourceStoreUri != null) + sourceStoreUri.cleanUp(); + if (targetStoreUri != null) + targetStoreUri.cleanUp(); + } + return null; + } + + protected StoreUri getTargetStoreUri() { + return targetStoreUri; + } + + protected String getTmpExtension() { + return DOT_PART; + } + + private boolean isSimulateTSMWrite(StoreUri sourceStoreUri, StoreUri targetStoreUri) { + return simulateTransferToTSM && (RemoteStoreProtocol.TSM.equals(targetStoreUri.getProtocol())); + } + + private void tryCopy(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + String currentTargetFileName = targetFileName; + + boolean renameAfterCopy = false; + if (getTmpExtension() != null && RemoteStoreProtocol.LOCAL.equals(targetStoreUri.getProtocol())) { + currentTargetFileName += getTmpExtension(); + renameAfterCopy = true; + } + + sourceStoreUri.transferFrom(targetStoreUri, sourceFileName, currentTargetFileName); + logger.info(getMarker(), "Transfer of {} completed from {} to {}", sourceFileName, sourceStoreUri, targetStoreUri); + + if (renameAfterCopy) { + Path tmpTargetFile = Paths.get(targetStoreUri.toString(true), currentTargetFileName); + Path targetFile = Paths.get(targetStoreUri.toString(true), targetFileName); + tmpTargetFile.toFile().renameTo(targetFile.toFile()); + } + } +} diff --git a/server/-product/production/AMC/jobs/steps/TSMTransferFromStep.java b/server/-product/production/AMC/jobs/steps/TSMTransferFromStep.java new file mode 100644 index 00000000..ab1b6bbf --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/TSMTransferFromStep.java @@ -0,0 +1,27 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.StoreUri; + +public class TSMTransferFromStep extends TransferStep { + private static final Logger logger = LogManager.getLogger(); + + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + Object[] result = null; + Path targetFile = Paths.get(targetStoreUri.toString(true), targetFileName); + if (targetFile.toFile().exists()) { + logger.info(getMarker(), "Using previously retrived file {}", targetFile); + } else { + result = super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } + return result; + } + +} diff --git a/server/-product/production/AMC/jobs/steps/TSMTransferToStep.java b/server/-product/production/AMC/jobs/steps/TSMTransferToStep.java new file mode 100644 index 00000000..efff055e --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/TSMTransferToStep.java @@ -0,0 +1,11 @@ +package user.jobengine.server.steps; + +import user.commons.StoreUri; + +public class TSMTransferToStep extends TransferStep { + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + return super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } +} diff --git a/server/-product/production/AMC/jobs/steps/TestForkCancelableStep.java b/server/-product/production/AMC/jobs/steps/TestForkCancelableStep.java new file mode 100644 index 00000000..fc434565 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/TestForkCancelableStep.java @@ -0,0 +1,37 @@ +package user.jobengine.server.steps; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.IJob; +import user.commons.JobStatus; +import user.commons.ListUtils; +import user.jobengine.server.IJobEngine; +import user.jobengine.server.IJobRuntime; + +public class TestForkCancelableStep extends JobStep { + private static final String CHILD_TITLE = "Párhuzamosított alfolyamat"; + // private static final String CHILD_TEMPLATE = "fake-concurrent.xml"; + private static final String CHILD_TEMPLATE = "cancelable.xml"; + private static final Logger logger = LogManager.getLogger(); + int count = 1; + + @StepEntry + public Object[] execute(IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception { + //jobRuntime.forkPrepare(); + for (int i = 0; i < count; i++) { + //jobEngine.submit(jobRuntime, null, CHILD_TEMPLATE, CHILD_TITLE, ListUtils.asMap("itemID", i)); + // IJobRuntime runtime = jobEngine.submit(jobRuntime, null, CHILD_TEMPLATE, "JOB " + i, ListUtils.asMap("param", i)); + IJobRuntime runtime = getEngine().submit(null, e -> { + if (e.getStatus().equals(JobStatus.CANCELED) || e.getStatus().equals(JobStatus.SUSPENDED)) + logger.info("Cleanup occured because status is {} {}", e.getStatus(), ((IJob) e.getSource()).getId()); + }, CHILD_TEMPLATE, "JOB " + i, 0, IJobEngine.DEFAULT_OWNER, ListUtils.asMap("param", i)); + + runtime.setRelated("TEST" + runtime.getId()); + } + + // jobRuntime.forkWaitComplete(); + logger.info("Done"); + return null; + } +} diff --git a/server/-product/production/AMC/jobs/steps/TransferStep.java b/server/-product/production/AMC/jobs/steps/TransferStep.java new file mode 100644 index 00000000..bdf02615 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/TransferStep.java @@ -0,0 +1,124 @@ +package user.jobengine.server.steps; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.commons.net.ftp.FTPClient; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.StoreUri; +import user.commons.remotestore.FtpDirectoryLister; +import user.commons.remotestore.RemoteStoreProtocol; +import user.jobengine.db.Store; + +public class TransferStep extends JobStep { + private static final String DOT_PART = ".part"; + private static final Logger logger = LogManager.getLogger(); + private static final boolean simulateTransferToTSM = Boolean.parseBoolean(System.getProperty("test.simulate.transfer.tsm", "false")); + protected StoreUri targetStoreUri; + + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + try { + this.targetStoreUri = targetStoreUri; + getJobRuntime().setCancelable(false); + + Store sourceStore = getManager().getStore(sourceStoreUri.getStoreId()); + Store targetStore = getManager().getStore(targetStoreUri.getStoreId()); + + String description = String.format("%s -> %s : %s", sourceStore.getName(), targetStore.getName(), sourceFileName); + getJobRuntime().setDescription(description); + + //logger.info(getSessionMarker(), String.valueOf(isSimulateTSMWrite(sourceStoreUri, targetStoreUri))); + if (isSimulateTSMWrite(sourceStoreUri, targetStoreUri)) { + logger.info(getMarker(), "Skipping real TSM write of {} from {} to {}", sourceFileName, sourceStoreUri, targetStoreUri); + return null; + } + + sourceStoreUri.addProgressListener(e -> setProgress(e.getProgress())); + + this.targetStoreUri = getTargetStoreUri(); + tryCopy(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } catch (Exception e) { + logger.error(getMarker(), "Error in transfer of {} when copying from {} to {}.", sourceFileName, sourceStoreUri, targetStoreUri); + throw e; + // logger.error(getMarker(), "Error in transfer of {} when copying from {} to {}. Retrying after 3 seconds.", sourceFileName, sourceStoreUri, + // targetStoreUri); + + // try { + // Thread.sleep(3000); + // tryCopy(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + // } catch (Exception e1) { + // logger.error(getSessionMarker(), "Error in transfer of {} when copying from {} to {}. System message is: {}", sourceFileName, sourceStoreUri, + // targetStoreUri, e1.getMessage()); + // throw e1; + // } + } finally { + if (sourceStoreUri != null) + sourceStoreUri.cleanUp(); + if (targetStoreUri != null) + targetStoreUri.cleanUp(); + } + return null; + } + + protected StoreUri getTargetStoreUri() { + return targetStoreUri; + } + + protected String getTmpExtension() { + return DOT_PART; + } + + private boolean isSimulateTSMWrite(StoreUri sourceStoreUri, StoreUri targetStoreUri) { + return simulateTransferToTSM && (RemoteStoreProtocol.TSM.equals(targetStoreUri.getProtocol())); + } + + private void tryCopy(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + String currentTargetFileName = targetFileName; + + boolean renameAfterCopy = false; + boolean renameAfterFTP = false; + if (getTmpExtension() != null) { + if (RemoteStoreProtocol.LOCAL.equals(targetStoreUri.getProtocol())) { + currentTargetFileName += getTmpExtension(); + renameAfterCopy = true; + } + Store targetStore = getManager().getStore(targetStoreUri.getStoreId()); + + if (RemoteStoreProtocol.FTP.equals(targetStoreUri.getProtocol()) && !"NEXIO1".equals(targetStore.getName()) + && !"NEXIO2".equals(targetStore.getName())) { + currentTargetFileName += getTmpExtension(); + renameAfterFTP = true; + } + } + + sourceStoreUri.transferFrom(targetStoreUri, sourceFileName, currentTargetFileName); + + logger.info(getMarker(), "Transfer completed from {} as {} to {} as {}", sourceFileName, sourceStoreUri, targetStoreUri, currentTargetFileName); + + if (renameAfterCopy) { + Path tmpTargetFile = Paths.get(targetStoreUri.toString(true), currentTargetFileName); + Path targetFile = Paths.get(targetStoreUri.toString(true), targetFileName); + try { + logger.info(getMarker(), "Renaming LOCAL file from {} to {} on {}", currentTargetFileName, targetFileName, sourceStoreUri); + tmpTargetFile.toFile().renameTo(targetFile.toFile()); + } catch (Exception e) { + logger.error(getMarker(), e.getMessage()); + } + } + if (renameAfterFTP) { + try { + FtpDirectoryLister lister = (FtpDirectoryLister) targetStoreUri.getLister(); + FTPClient client = lister.connect(); + logger.info(getMarker(), "Renaming FTP file from {} to {} on {}", currentTargetFileName, targetFileName, sourceStoreUri); + client.rename(currentTargetFileName, targetFileName); + } catch (Exception e) { + logger.error(getMarker(), e.getMessage()); + } finally { + targetStoreUri.cleanUp(); + } + } + } +} diff --git a/server/-product/production/AMC/jobs/steps/TransferToFTPStep.java b/server/-product/production/AMC/jobs/steps/TransferToFTPStep.java new file mode 100644 index 00000000..b42d5d53 --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/TransferToFTPStep.java @@ -0,0 +1,11 @@ +package user.jobengine.server.steps; + +import user.commons.StoreUri; + +public class TransferToFTPStep extends TransferStep { + @Override + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String targetFileName) throws Exception { + return super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } +} diff --git a/server/-product/production/AMC/jobs/steps/VODTransferToStep.java b/server/-product/production/AMC/jobs/steps/VODTransferToStep.java new file mode 100644 index 00000000..7bf240fd --- /dev/null +++ b/server/-product/production/AMC/jobs/steps/VODTransferToStep.java @@ -0,0 +1,21 @@ +package user.jobengine.server.steps; + +import user.commons.StoreUri; + +public class VODTransferToStep extends TransferStep { + private String relativeTargetPath; + + @Override + protected StoreUri configureTargetUri(StoreUri targetStoreUri) { + targetStoreUri.setRootPath(relativeTargetPath); + return targetStoreUri; + } + + @StepEntry + public Object[] execute(StoreUri sourceStoreUri, String sourceFileName, StoreUri targetStoreUri, String relativeTargetPath, String targetFileName) + throws Exception { + this.relativeTargetPath = relativeTargetPath; + return super.execute(sourceStoreUri, sourceFileName, targetStoreUri, targetFileName); + } + +} diff --git a/server/-product/production/AMC/jobs/templates/FILEZILLA_AVID-validate-and-restore.xml b/server/-product/production/AMC/jobs/templates/FILEZILLA_AVID-validate-and-restore.xml new file mode 100644 index 00000000..5395ce44 --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/FILEZILLA_AVID-validate-and-restore.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/AMC/jobs/templates/FILEZILLA_PASARESTORE-validate-and-archive.xml b/server/-product/production/AMC/jobs/templates/FILEZILLA_PASARESTORE-validate-and-archive.xml new file mode 100644 index 00000000..7caa7e2c --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/FILEZILLA_PASARESTORE-validate-and-archive.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/AMC/jobs/templates/FILEZILLA_PASARESTORE-validate-and-restore.xml b/server/-product/production/AMC/jobs/templates/FILEZILLA_PASARESTORE-validate-and-restore.xml new file mode 100644 index 00000000..da82bd6d --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/FILEZILLA_PASARESTORE-validate-and-restore.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/validate-and-archive.xml b/server/-product/production/AMC/jobs/templates/NEXIO1-validate-and-archive.xml similarity index 89% rename from server/-product/production/HIRTV/jobs/templates/validate-and-archive.xml rename to server/-product/production/AMC/jobs/templates/NEXIO1-validate-and-archive.xml index 9882f40e..7426382a 100644 --- a/server/-product/production/HIRTV/jobs/templates/validate-and-archive.xml +++ b/server/-product/production/AMC/jobs/templates/NEXIO1-validate-and-archive.xml @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ - + @@ -51,7 +51,7 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/validate-and-restore.xml b/server/-product/production/AMC/jobs/templates/NEXIO1-validate-and-restore.xml similarity index 91% rename from server/-product/production/HIRTV/jobs/templates/validate-and-restore.xml rename to server/-product/production/AMC/jobs/templates/NEXIO1-validate-and-restore.xml index 43fa0c1e..5b11ead5 100644 --- a/server/-product/production/HIRTV/jobs/templates/validate-and-restore.xml +++ b/server/-product/production/AMC/jobs/templates/NEXIO1-validate-and-restore.xml @@ -14,7 +14,7 @@ - + @@ -52,7 +52,7 @@ - + diff --git a/server/-product/production/AMC/jobs/templates/NEXIO2-validate-and-archive.xml b/server/-product/production/AMC/jobs/templates/NEXIO2-validate-and-archive.xml new file mode 100644 index 00000000..005122a1 --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/NEXIO2-validate-and-archive.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/AMC/jobs/templates/NEXIO2-validate-and-restore.xml b/server/-product/production/AMC/jobs/templates/NEXIO2-validate-and-restore.xml new file mode 100644 index 00000000..15b0e18b --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/NEXIO2-validate-and-restore.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/AMC/jobs/templates/PASAPOOL-validate-and-restore.xml b/server/-product/production/AMC/jobs/templates/PASAPOOL-validate-and-restore.xml new file mode 100644 index 00000000..df9ebe1d --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/PASAPOOL-validate-and-restore.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/AMC/jobs/templates/VOD-validate-and-restore.xml b/server/-product/production/AMC/jobs/templates/VOD-validate-and-restore.xml new file mode 100644 index 00000000..5cdcadb1 --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/VOD-validate-and-restore.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/AMC/jobs/templates/cancelable.xml b/server/-product/production/AMC/jobs/templates/cancelable.xml new file mode 100644 index 00000000..fa29cc3f --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/cancelable.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/sys-recreate-lowres.xml b/server/-product/production/AMC/jobs/templates/create-lowres-ondemand.xml similarity index 64% rename from server/-product/production/HIRTV/jobs/templates/sys-recreate-lowres.xml rename to server/-product/production/AMC/jobs/templates/create-lowres-ondemand.xml index 3c1381db..375beb2f 100644 --- a/server/-product/production/HIRTV/jobs/templates/sys-recreate-lowres.xml +++ b/server/-product/production/AMC/jobs/templates/create-lowres-ondemand.xml @@ -1,7 +1,11 @@ - + + + + + @@ -9,60 +13,44 @@ + - - - - - - + + + + - - - - - - - - - - - - - - - - + - + - + - + @@ -78,7 +66,7 @@ - + @@ -88,7 +76,7 @@ - + @@ -103,14 +91,14 @@ - + - + diff --git a/server/-product/production/HIRTV/jobs/templates/fork-validate-and-archive.xml b/server/-product/production/AMC/jobs/templates/fork-validate-and-archive.xml similarity index 100% rename from server/-product/production/HIRTV/jobs/templates/fork-validate-and-archive.xml rename to server/-product/production/AMC/jobs/templates/fork-validate-and-archive.xml diff --git a/server/-product/production/HIRTV/jobs/templates/fork-validate-and-restore.xml b/server/-product/production/AMC/jobs/templates/fork-validate-and-restore.xml similarity index 100% rename from server/-product/production/HIRTV/jobs/templates/fork-validate-and-restore.xml rename to server/-product/production/AMC/jobs/templates/fork-validate-and-restore.xml diff --git a/server/-product/production/HIRTV/jobs/templates/generic-archive-checker.xml b/server/-product/production/AMC/jobs/templates/generic-archive-checker.xml similarity index 91% rename from server/-product/production/HIRTV/jobs/templates/generic-archive-checker.xml rename to server/-product/production/AMC/jobs/templates/generic-archive-checker.xml index c321bee5..500369e8 100644 --- a/server/-product/production/HIRTV/jobs/templates/generic-archive-checker.xml +++ b/server/-product/production/AMC/jobs/templates/generic-archive-checker.xml @@ -1,6 +1,6 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/harris-missingmaterial-checker.xml b/server/-product/production/AMC/jobs/templates/harris1-missingmaterial-checker.xml similarity index 90% rename from server/-product/production/HIRTV/jobs/templates/harris-missingmaterial-checker.xml rename to server/-product/production/AMC/jobs/templates/harris1-missingmaterial-checker.xml index 570b57e9..5777fa2e 100644 --- a/server/-product/production/HIRTV/jobs/templates/harris-missingmaterial-checker.xml +++ b/server/-product/production/AMC/jobs/templates/harris1-missingmaterial-checker.xml @@ -1,6 +1,6 @@ - + diff --git a/server/-product/production/AMC/jobs/templates/harris2-missingmaterial-checker.xml b/server/-product/production/AMC/jobs/templates/harris2-missingmaterial-checker.xml new file mode 100644 index 00000000..5777fa2e --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/harris2-missingmaterial-checker.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/nexio-archive-checker.xml b/server/-product/production/AMC/jobs/templates/nexio1-archive-checker.xml similarity index 92% rename from server/-product/production/HIRTV/jobs/templates/nexio-archive-checker.xml rename to server/-product/production/AMC/jobs/templates/nexio1-archive-checker.xml index a785ebdc..991c0626 100644 --- a/server/-product/production/HIRTV/jobs/templates/nexio-archive-checker.xml +++ b/server/-product/production/AMC/jobs/templates/nexio1-archive-checker.xml @@ -1,6 +1,6 @@ - + diff --git a/server/-product/production/AMC/jobs/templates/nexio2-archive-checker.xml b/server/-product/production/AMC/jobs/templates/nexio2-archive-checker.xml new file mode 100644 index 00000000..991c0626 --- /dev/null +++ b/server/-product/production/AMC/jobs/templates/nexio2-archive-checker.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/peablebeach-missingmaterial-checker.xml b/server/-product/production/AMC/jobs/templates/peablebeach-missingmaterial-checker.xml similarity index 100% rename from server/-product/production/HIRTV/jobs/templates/peablebeach-missingmaterial-checker.xml rename to server/-product/production/AMC/jobs/templates/peablebeach-missingmaterial-checker.xml diff --git a/server/-product/production/HIRTV/jobs/templates/register-user-restore.xml b/server/-product/production/AMC/jobs/templates/register-user-restore.xml similarity index 89% rename from server/-product/production/HIRTV/jobs/templates/register-user-restore.xml rename to server/-product/production/AMC/jobs/templates/register-user-restore.xml index eae8c9b5..43a94d22 100644 --- a/server/-product/production/HIRTV/jobs/templates/register-user-restore.xml +++ b/server/-product/production/AMC/jobs/templates/register-user-restore.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/register-vod-restore.xml b/server/-product/production/AMC/jobs/templates/register-vod-restore.xml similarity index 100% rename from server/-product/production/HIRTV/jobs/templates/register-vod-restore.xml rename to server/-product/production/AMC/jobs/templates/register-vod-restore.xml diff --git a/server/-product/production/HIRTV/jobs/templates/test-fork-cancelable.xml b/server/-product/production/AMC/jobs/templates/test-fork-cancelable.xml similarity index 69% rename from server/-product/production/HIRTV/jobs/templates/test-fork-cancelable.xml rename to server/-product/production/AMC/jobs/templates/test-fork-cancelable.xml index f3d21d6e..8c88d84b 100644 --- a/server/-product/production/HIRTV/jobs/templates/test-fork-cancelable.xml +++ b/server/-product/production/AMC/jobs/templates/test-fork-cancelable.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/validate-dir-mxf.xml b/server/-product/production/AMC/jobs/templates/validate-dir-mxf.xml similarity index 72% rename from server/-product/production/HIRTV/jobs/templates/validate-dir-mxf.xml rename to server/-product/production/AMC/jobs/templates/validate-dir-mxf.xml index 276152ec..2a2972be 100644 --- a/server/-product/production/HIRTV/jobs/templates/validate-dir-mxf.xml +++ b/server/-product/production/AMC/jobs/templates/validate-dir-mxf.xml @@ -1,12 +1,12 @@ - + - + diff --git a/server/-product/production/AMC/mediacube.bat b/server/-product/production/AMC/mediacube.bat new file mode 100644 index 00000000..64cbf781 --- /dev/null +++ b/server/-product/production/AMC/mediacube.bat @@ -0,0 +1,18 @@ +@echo off +if exist tmp rmdir tmp /s /q +mkdir tmp +java ^ +-Dclean ^ +-Dorg.eclipse.epp.logging.aeri.skipReports=true ^ +-Declipse.ignoreApp=true ^ +-Dosgi.noShutdown=true ^ +-Dlog4j.configurationFile=settings/log4j2.xml ^ +-Djetty.home=settings/test-jetty ^ +-Djetty.etc.config.urls=jetty.xml,jetty-ssl.xml,jetty-ssl-context.xml,jetty-http.xml,jetty-https.xml ^ +-Djava.io.tmpdir=tmp ^ +-Dfile.encoding=UTF-8 ^ +-Dgosh.home=configuration ^ +-jar plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar ^ +-Xms512m ^ +-Xmx1024m ^ +-console diff --git a/server/-product/production/AMC/settings/application.yaml b/server/-product/production/AMC/settings/application.yaml new file mode 100644 index 00000000..12ff38b7 --- /dev/null +++ b/server/-product/production/AMC/settings/application.yaml @@ -0,0 +1,34 @@ +datasource: + mediacube: + url: jdbc:db2://192.168.0.16:50000/mc + user: db2admin + password: password + external-indexer: false + simple-search: true + login-timeout: 3 + pool-size: 10 + mediacube-nosql: + url: jdbc:db2://192.168.0.16:50000/mc + user: db2admin + password: password + schema: test + login-timeout: 3 +services: + ffmpeg: + execurable-location: /opt/ffmpeg/ffmpeg + mediacube: + proxy-root: /opt + nexio: + disabled: true +jobs: + validate-transfers: false + copy-buffer-size: 32768 + scheduled-execution-disabled: true +tsm: + randomize-archives: false + delimiter: \ + node-name: PASANODE + fs-name: NEXIO + alternate-fs-name: PASA + hl-name: \ + \ No newline at end of file diff --git a/server/-product/production/HIRTV/configuration/jetty/jetty-http.xml b/server/-product/production/AMC/settings/jetty/jetty-http.xml similarity index 100% rename from server/-product/production/HIRTV/configuration/jetty/jetty-http.xml rename to server/-product/production/AMC/settings/jetty/jetty-http.xml diff --git a/server/-product/production/HIRTV/configuration/jetty/jetty-https.xml b/server/-product/production/AMC/settings/jetty/jetty-https.xml similarity index 100% rename from server/-product/production/HIRTV/configuration/jetty/jetty-https.xml rename to server/-product/production/AMC/settings/jetty/jetty-https.xml diff --git a/server/-product/production/HIRTV/configuration/jetty/jetty-ssl-context.xml b/server/-product/production/AMC/settings/jetty/jetty-ssl-context.xml similarity index 100% rename from server/-product/production/HIRTV/configuration/jetty/jetty-ssl-context.xml rename to server/-product/production/AMC/settings/jetty/jetty-ssl-context.xml diff --git a/server/-product/production/HIRTV/configuration/jetty/jetty-ssl.xml b/server/-product/production/AMC/settings/jetty/jetty-ssl.xml similarity index 100% rename from server/-product/production/HIRTV/configuration/jetty/jetty-ssl.xml rename to server/-product/production/AMC/settings/jetty/jetty-ssl.xml diff --git a/server/-product/production/HIRTV/configuration/jetty/jetty.xml b/server/-product/production/AMC/settings/jetty/jetty.xml similarity index 100% rename from server/-product/production/HIRTV/configuration/jetty/jetty.xml rename to server/-product/production/AMC/settings/jetty/jetty.xml diff --git a/server/-product/production/HIRTV/configuration/jetty/keystore b/server/-product/production/AMC/settings/jetty/keystore similarity index 100% rename from server/-product/production/HIRTV/configuration/jetty/keystore rename to server/-product/production/AMC/settings/jetty/keystore diff --git a/server/-product/production/HIRTV/configuration/jetty/localhost.jks b/server/-product/production/AMC/settings/jetty/localhost.jks similarity index 100% rename from server/-product/production/HIRTV/configuration/jetty/localhost.jks rename to server/-product/production/AMC/settings/jetty/localhost.jks diff --git a/server/-product/production/AMC/settings/log4j2.xml b/server/-product/production/AMC/settings/log4j2.xml new file mode 100644 index 00000000..3681b48f --- /dev/null +++ b/server/-product/production/AMC/settings/log4j2.xml @@ -0,0 +1,174 @@ + + + + log + ${logPath}/mediacube.log + ${logPath}/$${date:yyyy-MM}/mediacube-%d{MM-dd-yyyy}-%i.log.gz + ${logPath}/markered-mediacube.log + ${logPath}/$${date:yyyy-MM}/markered-mediacube-%d{MM-dd-yyyy}-%i.log.gz + ${logPath}/mediacube-err.log + ${logPath}/$${date:yyyy-MM}/mediacube-err-%d{MM-dd-yyyy}-%i.log.gz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/mediacube.json b/server/-product/production/AMC/settings/mediacube.json similarity index 74% rename from server/-product/production/MEDIAVIVANTIS/configuration/mediacube.json rename to server/-product/production/AMC/settings/mediacube.json index c01d31f8..d7113939 100644 --- a/server/-product/production/MEDIAVIVANTIS/configuration/mediacube.json +++ b/server/-product/production/AMC/settings/mediacube.json @@ -1,5 +1,8 @@ { "jobQueuePollInterval": 1000, + "targetRestoreFilters": [ + "FILEZILLA_AVID", "FILEZILLA_PASARESTORE" + ], "topTypeFilters": [ { "name": "Hír bejátszó", @@ -56,22 +59,20 @@ ], "authentication": { "authEnabled": true, - "adHost": "intra.mediavivantis.hu", + "adHost": "intra.amc.hu", "adNonSecurePort": 3268, - "adBaseDn": "DC=intra,DC=mediavivantis,DC=hu", + "adBaseDn": "DC=intra,DC=amc,DC=hu", "adAdminMap": [ - "G_MV_U_MUSZAK", - "G_MV_U_INGEST" + "INFORMATIKUSOK", + "MUSZAKVEZETOK" ], "adSubmitterMap": [ - "G_ECH_U_INFORMATIKUSOK", - "G_ECH_U_MUSZAKVEZETOK", - "ECH-ISILON-ADMINS" + "INFORMATIKUSOK", + "MUSZAKVEZETOK" ], "adEditorMap": [ - "G_ECH_U_INFORMATIKUSOK", - "G_ECH_U_MUSZAKVEZETOK", - "ECH-ISILON-ADMINS" + "INFORMATIKUSOK", + "MUSZAKVEZETOK" ], "localAccounts": [ { @@ -79,11 +80,21 @@ "password" : "5F4DCC3B5AA765D61D8327DEB882CF99", "email" : null }, + { + "user" : "user1", + "password" : "5F4DCC3B5AA765D61D8327DEB882CF99", + "email" : null + }, { "user" : "lebony", "password" : "4E25B117B14D86D7DCECB4E433CF932C", "email" : null }, + { + "user" : "editor", + "password" : "5AEE9DBD2A188839105073571BEE1B1F", + "email" : null + }, { "user" : "root", "password" : "5F4DCC3B5AA765D61D8327DEB882CF99", diff --git a/server/-product/production/AMC/settings/test-jetty/jetty-deployer.xml b/server/-product/production/AMC/settings/test-jetty/jetty-deployer.xml new file mode 100644 index 00000000..ba61d105 --- /dev/null +++ b/server/-product/production/AMC/settings/test-jetty/jetty-deployer.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern + .*/[^/]*servlet-api-[^/]*\.jar$|.*/javax.servlet.jsp.jstl-.*\.jar$|.*/org.apache.taglibs.taglibs-standard-impl-.*\.jar$ + + + + + + + + + + + jetty.deploy.monitoredPath + + / + + + + + + jetty.deploy.defaultsDescriptorPath + + /etc/webdefault.xml + + + + + + + + + + + + + + + + + + diff --git a/server/-product/production/AMC/settings/test-jetty/jetty-http-redirect.xml b/server/-product/production/AMC/settings/test-jetty/jetty-http-redirect.xml new file mode 100644 index 00000000..556f544d --- /dev/null +++ b/server/-product/production/AMC/settings/test-jetty/jetty-http-redirect.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https + 8444 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/-product/production/AMC/settings/test-jetty/jetty-http.xml b/server/-product/production/AMC/settings/test-jetty/jetty-http.xml new file mode 100644 index 00000000..f4f61bfa --- /dev/null +++ b/server/-product/production/AMC/settings/test-jetty/jetty-http.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-https.xml b/server/-product/production/AMC/settings/test-jetty/jetty-https.xml similarity index 100% rename from server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-https.xml rename to server/-product/production/AMC/settings/test-jetty/jetty-https.xml diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-ssl-context.xml b/server/-product/production/AMC/settings/test-jetty/jetty-ssl-context.xml similarity index 100% rename from server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-ssl-context.xml rename to server/-product/production/AMC/settings/test-jetty/jetty-ssl-context.xml diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-ssl.xml b/server/-product/production/AMC/settings/test-jetty/jetty-ssl.xml similarity index 98% rename from server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-ssl.xml rename to server/-product/production/AMC/settings/test-jetty/jetty-ssl.xml index a079c1f6..db6e2eb4 100644 --- a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-ssl.xml +++ b/server/-product/production/AMC/settings/test-jetty/jetty-ssl.xml @@ -27,7 +27,7 @@ - + diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty.xml b/server/-product/production/AMC/settings/test-jetty/jetty.xml similarity index 99% rename from server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty.xml rename to server/-product/production/AMC/settings/test-jetty/jetty.xml index 0ba38381..c9afdb5f 100644 --- a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty.xml +++ b/server/-product/production/AMC/settings/test-jetty/jetty.xml @@ -78,7 +78,7 @@ - + diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/keystore b/server/-product/production/AMC/settings/test-jetty/keystore similarity index 100% rename from server/-product/production/MEDIAVIVANTIS/configuration/jetty/keystore rename to server/-product/production/AMC/settings/test-jetty/keystore diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/localhost.jks b/server/-product/production/AMC/settings/test-jetty/localhost.jks similarity index 100% rename from server/-product/production/MEDIAVIVANTIS/configuration/jetty/localhost.jks rename to server/-product/production/AMC/settings/test-jetty/localhost.jks diff --git a/server/-product/production/HIRTV/configuration/config.ini b/server/-product/production/HIRTV/configuration/config.ini index 58957707..fd4c203b 100644 --- a/server/-product/production/HIRTV/configuration/config.ini +++ b/server/-product/production/HIRTV/configuration/config.ini @@ -1,93 +1,9 @@ -#2021-02-06 -osgi.bundles=reference\:file\:cglib_2.2.2.jar@4,\ -reference\:file\:com.fasterxml.jackson.core.jackson-annotations_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.core.jackson-core_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.core.jackson-databind_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.datatype.jackson-datatype-joda_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-base_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.dataformat.jackson-dataformat-yaml_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.module.jackson-module-jaxb-annotations_2.4.5.jar@4,\ -reference\:file\:com.ibm.db2.jcc_1.4.0.jar@4,\ -reference\:file\:com.ibm.nosql_4.19.26.jar@4,\ -reference\:file\:com.microsoft.sqlserver.sqljdbc_6.0.8112.100.jar@4,\ -reference\:file\:com.sun.jna_4.2.0.jar@4,\ -reference\:file\:groovy_3.0.3.jar@4,\ -reference\:file\:io.humble.video-arch-x86_64-pc-linux-gnu6_0.2.1.jar@4,\ -reference\:file\:io.humble.video-arch-x86_64-w64-mingw32_0.2.1.jar@4,\ -reference\:file\:io.humble.video-noarch_0.2.1.jar@4,\ -reference\:file\:javax.annotation-api_1.2.0.jar@4,\ -reference\:file\:javax.mail_1.5.0.b01.jar@4,\ -reference\:file\:javax.servlet-api_3.1.0.jar@4,\ -reference\:file\:javax.ws.rs-api_2.0.1.jar@4,\ -reference\:file\:jcifs_1.3.17.jar@4,\ -reference\:file\:joda-time_2.2.0.jar@4,\ -reference\:file\:junit_4.12.0.jar@4,\ -reference\:file\:org.apache.aries.spifly.dynamic.bundle_1.0.8.jar@4,\ -reference\:file\:org.apache.aries.util_1.0.0.jar@4,\ -reference\:file\:org.apache.commons.beanutils_1.8.3.jar@4,\ -reference\:file\:org.apache.commons.codec_1.6.0.v201305230611.jar@4,\ -reference\:file\:org.apache.commons.collections_3.2.2.v201511171945.jar@4,\ -reference\:file\:org.apache.commons.digester_3.2.0.jar@4,\ -reference\:file\:org.apache.commons.io_2.6.0.jar@4,\ -reference\:file\:org.apache.commons.lang_2.6.0.v201404270220.jar@4,\ -reference\:file\:org.apache.commons.net_3.6.0.jar@4,\ -reference\:file\:org.apache.felix.gogo.command_0.10.0.jar@4,\ -reference\:file\:org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar@4,\ -reference\:file\:org.apache.felix.gogo.shell_0.10.0.v201212101605.jar@4,\ -reference\:file\:org.apache.httpcomponents.httpclient_4.5.2.v20161115-1643.jar@4,\ -reference\:file\:org.apache.httpcomponents.httpcore_4.4.4.v20161115-1643.jar@4,\ -reference\:file\:org.apache.logging.log4j.api_2.8.2.jar@1\:start,\ -reference\:file\:org.apache.logging.log4j.core_2.8.2.jar@4,\ -reference\:file\:org.apache.logging.log4j.slf4j-impl_2.8.2.jar@4,\ -reference\:file\:org.apache.servicemix.bundles.quartz_2.3.0.2.jar@4,\ -reference\:file\:org.eclipse.equinox.common_3.8.0.v20160509-1230.jar@2\:start,\ -reference\:file\:org.eclipse.equinox.console_1.1.200.v20150929-1405.jar@4,\ -reference\:file\:org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar@1\:start,\ -reference\:file\:org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar@4,\ -reference\:file\:org.eclipse.equinox.util_1.0.500.v20130404-1337.jar@4,\ -reference\:file\:org.eclipse.jetty.client_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.deploy_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.http_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.io_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.osgi.boot_9.3.9.v20160517.jar@4\:start,\ -reference\:file\:org.eclipse.jetty.schemas_3.1.0.jar@4,\ -reference\:file\:org.eclipse.jetty.security_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.server_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.servlet_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.util_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.webapp_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.api_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.client_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.common_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.server_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.servlet_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.xml_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.osgi.services_3.2.100.v20100503.jar@4,\ -reference\:file\:org.hamcrest.core_1.3.0.v201303031735.jar@4,\ -reference\:file\:org.jboss.resteasy.client_3.0.11.Final.jar@4,\ -reference\:file\:org.jboss.resteasy.jaxb-provider_3.0.11.Final.jar@4,\ -reference\:file\:org.jboss.resteasy.jaxrs_3.0.11.Final.jar@4,\ -reference\:file\:org.jboss.resteasy.jaxrs-api_3.0.11.Final.jar@4,\ -reference\:file\:org.jmock_2.6.0.jar@4,\ -reference\:file\:org.jmock.junit4_2.6.0.jar@4,\ -reference\:file\:org.mybatis.mybatis_3.5.2.jar@4,\ -reference\:file\:org.objectweb.asm_5.1.0.v20160914-0701.jar@4,\ -reference\:file\:org.objectweb.asm.commons_5.0.1.v201404251740.jar@4,\ -reference\:file\:org.objectweb.asm.tree_5.1.0.v20160914-0701.jar@4,\ -reference\:file\:org.omnifaces_3.4.1.jar@4,\ -reference\:file\:org.slf4j.jcl_1.7.2.v20130115-1340.jar@4,\ -reference\:file\:slf4j.api_1.7.24.jar@4,\ -reference\:file\:slf4j.simple_1.7.2.jar@4,\ -reference\:file\:user.commons.log4j2_1.0.0.jar@4,\ -reference\:file\:user.commons.zk_8.0.3.jar@4,\ -reference\:file\:user.jobengine.osgi.commons_1.0.0.jar@4\:start,\ -reference\:file\:user.jobengine.osgi.db_1.0.0.jar@4,\ -reference\:file\:user.jobengine.osgi.server_1.0.0.jar@4,\ -reference\:file\:user.jobengine.osgi.services_1.0.0.jar@4,\ -reference\:file\:user.mediacube.gui_1.0.0.jar@4,\ -reference\:file\:user.mediacube.metadata_1.0.0.jar@4,\ -reference\:file\:user.tsm.client_1.2.0.jar@4 +#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser +#Wed Feb 10 16:05:17 CET 2021 +osgi.bundles=reference\:file\:cglib_2.2.2.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-annotations_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-core_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-databind_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.dataformat.jackson-dataformat-yaml_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.datatype.jackson-datatype-joda_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-base_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.module.jackson-module-jaxb-annotations_2.4.5.jar@4,reference\:file\:com.ibm.db2.jcc_1.4.0.jar@4,reference\:file\:com.ibm.nosql_4.19.26.jar@4,reference\:file\:com.microsoft.sqlserver.sqljdbc_6.0.8112.100.jar@4,reference\:file\:com.sun.jna_4.2.0.jar@4,reference\:file\:groovy_3.0.3.jar@4,reference\:file\:io.humble.video-arch-x86_64-pc-linux-gnu6_0.2.1.jar@4,reference\:file\:io.humble.video-arch-x86_64-w64-mingw32_0.2.1.jar@4,reference\:file\:io.humble.video-noarch_0.2.1.jar@4,reference\:file\:javax.annotation-api_1.2.0.jar@4,reference\:file\:javax.mail_1.5.0.b01.jar@4,reference\:file\:javax.servlet-api_3.1.0.jar@4,reference\:file\:javax.ws.rs-api_2.0.1.jar@4,reference\:file\:jcifs_1.3.17.jar@4,reference\:file\:joda-time_2.2.0.jar@4,reference\:file\:junit_4.12.0.jar@4,reference\:file\:org.apache.aries.spifly.dynamic.bundle_1.0.8.jar@4,reference\:file\:org.apache.aries.util_1.0.0.jar@4,reference\:file\:org.apache.commons.beanutils_1.8.3.jar@4,reference\:file\:org.apache.commons.collections_3.2.2.jar@4,reference\:file\:org.apache.commons.digester_3.2.0.jar@4,reference\:file\:org.apache.commons.io_2.6.0.jar@4,reference\:file\:org.apache.commons.lang_2.6.0.jar@4,reference\:file\:org.apache.commons.net_3.6.0.jar@4,reference\:file\:org.apache.felix.gogo.command_0.12.0.jar@4,reference\:file\:org.apache.felix.gogo.runtime_0.12.0.jar@4,reference\:file\:org.apache.felix.gogo.shell_0.12.0.jar@4,reference\:file\:org.apache.httpcomponents.httpclient_4.2.6.jar@4,reference\:file\:org.apache.httpcomponents.httpcore_4.2.5.jar@4,reference\:file\:org.apache.logging.log4j.api_2.8.2.jar@1\:start,reference\:file\:org.apache.logging.log4j.core_2.8.2.jar@4,reference\:file\:org.apache.logging.log4j.slf4j-impl_2.8.2.jar@4,reference\:file\:org.apache.servicemix.bundles.quartz_2.3.0.2.jar@4,reference\:file\:org.eclipse.equinox.common_3.8.0.v20160509-1230.jar@2\:start,reference\:file\:org.eclipse.equinox.console_1.1.200.v20150929-1405.jar@4,reference\:file\:org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar@1\:start,reference\:file\:org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar@4,reference\:file\:org.eclipse.equinox.util_1.0.500.v20130404-1337.jar@4,reference\:file\:org.eclipse.jetty.client_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.deploy_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.http_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.io_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.osgi.boot_9.3.9.v20160517.jar@4\:start,reference\:file\:org.eclipse.jetty.schemas_3.1.0.jar@4,reference\:file\:org.eclipse.jetty.security_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.server_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.servlet_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.util_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.webapp_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.api_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.client_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.common_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.server_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.servlet_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.xml_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.osgi.services_3.2.100.v20100503.jar@4,reference\:file\:org.hamcrest.core_1.3.0.jar@4,reference\:file\:org.jboss.resteasy.client_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxb-provider_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxrs_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxrs-api_3.0.11.Final.jar@4,reference\:file\:org.jmock_2.6.0.jar@4,reference\:file\:org.jmock.junit4_2.6.0.jar@4,reference\:file\:org.mybatis.mybatis_3.5.2.jar@4,reference\:file\:org.objectweb.asm_5.0.1.jar@4,reference\:file\:org.objectweb.asm.commons_5.0.1.jar@4,reference\:file\:org.objectweb.asm.tree_5.0.1.jar@4,reference\:file\:org.omnifaces_3.4.1.jar@4,reference\:file\:slf4j.api_1.7.24.jar@4,reference\:file\:slf4j.simple_1.7.2.jar@4,reference\:file\:user.commons.log4j2_1.0.0.jar@4,reference\:file\:user.commons.zk_8.0.3.jar@4,reference\:file\:user.jobengine.osgi.commons_1.0.0.jar@4\:start,reference\:file\:user.jobengine.osgi.db_1.0.0.jar@4,reference\:file\:user.jobengine.osgi.server_1.0.0.jar@4,reference\:file\:user.jobengine.osgi.services_1.0.0.jar@4,reference\:file\:user.mediacube.gui_1.0.0.jar@4,reference\:file\:user.mediacube.metadata_1.0.0.jar@4,reference\:file\:user.tsm.client_1.2.0.jar@4 equinox.use.ds=true osgi.bundles.defaultStartLevel=4 osgi.framework=file\:plugins/org.eclipse.osgi_3.11.2.v20161107-1947.jar +osgi.framework.extensions= +eclipse.p2.data.area=@config.dir/../p2 +eclipse.p2.profile=DefaultProfile diff --git a/server/-product/production/HIRTV/jobs/templates/archive-limited.xml b/server/-product/production/HIRTV/jobs/templates/archive-limited.xml index 6bd8f11d..933be972 100644 --- a/server/-product/production/HIRTV/jobs/templates/archive-limited.xml +++ b/server/-product/production/HIRTV/jobs/templates/archive-limited.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/archive-material.xml b/server/-product/production/HIRTV/jobs/templates/archive-material.xml index e63d3a12..bb17dc38 100644 --- a/server/-product/production/HIRTV/jobs/templates/archive-material.xml +++ b/server/-product/production/HIRTV/jobs/templates/archive-material.xml @@ -1,5 +1,5 @@ - + @@ -44,6 +44,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/archive-ondemand.xml b/server/-product/production/HIRTV/jobs/templates/archive-ondemand.xml index 6bd8f11d..933be972 100644 --- a/server/-product/production/HIRTV/jobs/templates/archive-ondemand.xml +++ b/server/-product/production/HIRTV/jobs/templates/archive-ondemand.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/archive-recursive.xml b/server/-product/production/HIRTV/jobs/templates/archive-recursive.xml deleted file mode 100644 index 02b97884..00000000 --- a/server/-product/production/HIRTV/jobs/templates/archive-recursive.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/batch-retrieve-ondemand.xml b/server/-product/production/HIRTV/jobs/templates/batch-retrieve-ondemand.xml index b5ae11e4..5a6dc54a 100644 --- a/server/-product/production/HIRTV/jobs/templates/batch-retrieve-ondemand.xml +++ b/server/-product/production/HIRTV/jobs/templates/batch-retrieve-ondemand.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/cancelable.xml b/server/-product/production/HIRTV/jobs/templates/cancelable.xml index c0accf91..a400a93b 100644 --- a/server/-product/production/HIRTV/jobs/templates/cancelable.xml +++ b/server/-product/production/HIRTV/jobs/templates/cancelable.xml @@ -1,27 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/common-copy.xml b/server/-product/production/HIRTV/jobs/templates/common-copy.xml deleted file mode 100644 index aa9cd0a5..00000000 --- a/server/-product/production/HIRTV/jobs/templates/common-copy.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/copyforarchive-nexio-materials.xml b/server/-product/production/HIRTV/jobs/templates/copyforarchive-nexio-materials.xml index 2abc5ae5..94ffab8e 100644 --- a/server/-product/production/HIRTV/jobs/templates/copyforarchive-nexio-materials.xml +++ b/server/-product/production/HIRTV/jobs/templates/copyforarchive-nexio-materials.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/copyforarchive-nexio-recordings.xml b/server/-product/production/HIRTV/jobs/templates/copyforarchive-nexio-recordings.xml index 60ca8b1d..0039b238 100644 --- a/server/-product/production/HIRTV/jobs/templates/copyforarchive-nexio-recordings.xml +++ b/server/-product/production/HIRTV/jobs/templates/copyforarchive-nexio-recordings.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/create-lowres-ondemand.xml b/server/-product/production/HIRTV/jobs/templates/create-lowres-ondemand.xml index 5dbdeb86..44a4e03f 100644 --- a/server/-product/production/HIRTV/jobs/templates/create-lowres-ondemand.xml +++ b/server/-product/production/HIRTV/jobs/templates/create-lowres-ondemand.xml @@ -1,5 +1,5 @@ - + @@ -95,7 +95,7 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/delete-materials.xml b/server/-product/production/HIRTV/jobs/templates/delete-materials.xml index 9e8c02ff..82b30492 100644 --- a/server/-product/production/HIRTV/jobs/templates/delete-materials.xml +++ b/server/-product/production/HIRTV/jobs/templates/delete-materials.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/delete-nexio-materials.xml b/server/-product/production/HIRTV/jobs/templates/delete-nexio-materials.xml index 925290af..63ed3062 100644 --- a/server/-product/production/HIRTV/jobs/templates/delete-nexio-materials.xml +++ b/server/-product/production/HIRTV/jobs/templates/delete-nexio-materials.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/delete-promo-materials.xml b/server/-product/production/HIRTV/jobs/templates/delete-promo-materials.xml index 3dc9a7da..f5df704c 100644 --- a/server/-product/production/HIRTV/jobs/templates/delete-promo-materials.xml +++ b/server/-product/production/HIRTV/jobs/templates/delete-promo-materials.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/duplicate-remover.xml b/server/-product/production/HIRTV/jobs/templates/duplicate-remover.xml deleted file mode 100644 index 4650acb0..00000000 --- a/server/-product/production/HIRTV/jobs/templates/duplicate-remover.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/fake-concurrent.xml b/server/-product/production/HIRTV/jobs/templates/fake-concurrent.xml index db218503..8223e409 100644 --- a/server/-product/production/HIRTV/jobs/templates/fake-concurrent.xml +++ b/server/-product/production/HIRTV/jobs/templates/fake-concurrent.xml @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/fake-noparams.xml b/server/-product/production/HIRTV/jobs/templates/fake-noparams.xml index a118f43f..8be63cec 100644 --- a/server/-product/production/HIRTV/jobs/templates/fake-noparams.xml +++ b/server/-product/production/HIRTV/jobs/templates/fake-noparams.xml @@ -1,6 +1,6 @@ - + - + \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/fake-spawn.xml b/server/-product/production/HIRTV/jobs/templates/fake-spawn.xml deleted file mode 100644 index bec5abeb..00000000 --- a/server/-product/production/HIRTV/jobs/templates/fake-spawn.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/fake.xml b/server/-product/production/HIRTV/jobs/templates/fake.xml index 3b2404bf..893becf7 100644 --- a/server/-product/production/HIRTV/jobs/templates/fake.xml +++ b/server/-product/production/HIRTV/jobs/templates/fake.xml @@ -1,16 +1,15 @@ - + - - + @@ -20,9 +19,6 @@ - - - diff --git a/server/-product/production/HIRTV/jobs/templates/import-statistics.xml b/server/-product/production/HIRTV/jobs/templates/import-statistics.xml index 44d771cb..464d9dc7 100644 --- a/server/-product/production/HIRTV/jobs/templates/import-statistics.xml +++ b/server/-product/production/HIRTV/jobs/templates/import-statistics.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/migrate-hsm.xml b/server/-product/production/HIRTV/jobs/templates/migrate-hsm.xml deleted file mode 100644 index 93f62ba7..00000000 --- a/server/-product/production/HIRTV/jobs/templates/migrate-hsm.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/retrieve-material.xml b/server/-product/production/HIRTV/jobs/templates/retrieve-material.xml index 1890feed..c886c7f3 100644 --- a/server/-product/production/HIRTV/jobs/templates/retrieve-material.xml +++ b/server/-product/production/HIRTV/jobs/templates/retrieve-material.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/retrieve-morpheus-missing-materials.xml b/server/-product/production/HIRTV/jobs/templates/retrieve-morpheus-missing-materials.xml index 94a21ba1..b6a2ac2b 100644 --- a/server/-product/production/HIRTV/jobs/templates/retrieve-morpheus-missing-materials.xml +++ b/server/-product/production/HIRTV/jobs/templates/retrieve-morpheus-missing-materials.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/retrieve-ondemand.xml b/server/-product/production/HIRTV/jobs/templates/retrieve-ondemand.xml index 704fb8e5..79f27899 100644 --- a/server/-product/production/HIRTV/jobs/templates/retrieve-ondemand.xml +++ b/server/-product/production/HIRTV/jobs/templates/retrieve-ondemand.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/retrieve-traffic-missing-materials.xml b/server/-product/production/HIRTV/jobs/templates/retrieve-traffic-missing-materials.xml index ab02fc57..b684ccae 100644 --- a/server/-product/production/HIRTV/jobs/templates/retrieve-traffic-missing-materials.xml +++ b/server/-product/production/HIRTV/jobs/templates/retrieve-traffic-missing-materials.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/retrieve.xml b/server/-product/production/HIRTV/jobs/templates/retrieve.xml deleted file mode 100644 index d8ffd62f..00000000 --- a/server/-product/production/HIRTV/jobs/templates/retrieve.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/submit-child.xml b/server/-product/production/HIRTV/jobs/templates/submit-child.xml index 935df111..e367b3e4 100644 --- a/server/-product/production/HIRTV/jobs/templates/submit-child.xml +++ b/server/-product/production/HIRTV/jobs/templates/submit-child.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/sync-octopus.xml b/server/-product/production/HIRTV/jobs/templates/sync-octopus.xml index 846caec5..86644526 100644 --- a/server/-product/production/HIRTV/jobs/templates/sync-octopus.xml +++ b/server/-product/production/HIRTV/jobs/templates/sync-octopus.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/sync-subtitles.xml b/server/-product/production/HIRTV/jobs/templates/sync-subtitles.xml deleted file mode 100644 index 7fa2a023..00000000 --- a/server/-product/production/HIRTV/jobs/templates/sync-subtitles.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/HIRTV/jobs/templates/sys-check-lowres-integrity.xml b/server/-product/production/HIRTV/jobs/templates/sys-check-lowres-integrity.xml index 4c5e1811..3dbed31d 100644 --- a/server/-product/production/HIRTV/jobs/templates/sys-check-lowres-integrity.xml +++ b/server/-product/production/HIRTV/jobs/templates/sys-check-lowres-integrity.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/sys-import-morpheus-missing-materials.xml b/server/-product/production/HIRTV/jobs/templates/sys-import-morpheus-missing-materials.xml index c339f067..27481dc4 100644 --- a/server/-product/production/HIRTV/jobs/templates/sys-import-morpheus-missing-materials.xml +++ b/server/-product/production/HIRTV/jobs/templates/sys-import-morpheus-missing-materials.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/sys-recreate-length.xml b/server/-product/production/HIRTV/jobs/templates/sys-recreate-length.xml index e9ec0f9b..85af21e1 100644 --- a/server/-product/production/HIRTV/jobs/templates/sys-recreate-length.xml +++ b/server/-product/production/HIRTV/jobs/templates/sys-recreate-length.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/sys-retrieve-missing-material.xml b/server/-product/production/HIRTV/jobs/templates/sys-retrieve-missing-material.xml index 35b4436e..45ac435a 100644 --- a/server/-product/production/HIRTV/jobs/templates/sys-retrieve-missing-material.xml +++ b/server/-product/production/HIRTV/jobs/templates/sys-retrieve-missing-material.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/test-multiparam.xml b/server/-product/production/HIRTV/jobs/templates/test-multiparam.xml index bf45329b..9acfd315 100644 --- a/server/-product/production/HIRTV/jobs/templates/test-multiparam.xml +++ b/server/-product/production/HIRTV/jobs/templates/test-multiparam.xml @@ -1,5 +1,5 @@ - + diff --git a/server/-product/production/HIRTV/jobs/templates/worker-keepalive.xml b/server/-product/production/HIRTV/jobs/templates/worker-keepalive.xml deleted file mode 100644 index c055aaa0..00000000 --- a/server/-product/production/HIRTV/jobs/templates/worker-keepalive.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/HIRTV/mediacube.bat b/server/-product/production/HIRTV/mediacube.bat index 5e00b128..64cbf781 100644 --- a/server/-product/production/HIRTV/mediacube.bat +++ b/server/-product/production/HIRTV/mediacube.bat @@ -1,6 +1,3 @@ -:-Djetty.etc.config.urls=etc/user-jetty.xml,etc/user-jetty-ssl.xml,etc/user-jetty-ssl-context.xml,etc/user-jetty-http.xml,etc/user-jetty-https.xml ^ - - @echo off if exist tmp rmdir tmp /s /q mkdir tmp @@ -9,32 +6,13 @@ java ^ -Dorg.eclipse.epp.logging.aeri.skipReports=true ^ -Declipse.ignoreApp=true ^ -Dosgi.noShutdown=true ^ --Dlog4j.configurationFile=configuration/log4j2.xml ^ --Djobengine.maestro.config=configuration/maestro.json ^ --Djobengine.mediacube.config=configuration/mediacube.json ^ --Djetty.home=configuration/jetty ^ +-Dlog4j.configurationFile=settings/log4j2.xml ^ +-Djetty.home=settings/test-jetty ^ -Djetty.etc.config.urls=jetty.xml,jetty-ssl.xml,jetty-ssl-context.xml,jetty-http.xml,jetty-https.xml ^ -Djava.io.tmpdir=tmp ^ --Djobengine.jobsteps.root=jobs/executors ^ --Djobengine.jobtemplates.root=jobs/templates ^ --Djobengine.jobscheduling.config=jobs/schedules.json ^ --Djobengine.jobsteps.config=jobs/executors.xml ^ --Djobengine.jobsteps.groovy.root=jobs/steps ^ --Djobengine.db.url=jdbc:db2://10.11.1.90:50000/mc ^ --Djobengine.db.user=db2admin ^ --Djobengine.db.password=password ^ --Djobengine.db.loginTimeout=3 ^ --Djobengine.nosql.db.url=jdbc:db2://10.11.1.90:50000/mc ^ --Djobengine.nosql.db.user=db2admin ^ --Djobengine.nosql.db.password=password ^ --Djobengine.nosql.db.schema=test ^ --Djobengine.nosql.db.loginTimeout=3 ^ --Dnexio.disable=true ^ --Djobengine.scheduledexecution.disabled=true ^ --Djobengine.randomize.archives=false ^ --Dgui.jobs.alternate.selector=true ^ --Dmediacube.simplesearch=true ^ +-Dfile.encoding=UTF-8 ^ +-Dgosh.home=configuration ^ -jar plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar ^ -Xms512m ^ -Xmx1024m ^ --console 5555 +-console diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/application.yaml b/server/-product/production/MEDIAVIVANTIS/configuration/application.yaml deleted file mode 100644 index c584e2a4..00000000 --- a/server/-product/production/MEDIAVIVANTIS/configuration/application.yaml +++ /dev/null @@ -1,63 +0,0 @@ -datasource: - mediacube: - url: jdbc:db2://10.11.1.90:50000/mc - user: db2admin - password: password - external-indexer: false - simple-search: true - login-timeout: 3 - pool-size: 10 - mediacube-nosql: - url: jdbc:db2://10.11.1.90:50000/mc - user: db2admin - password: password - schema: test - login-timeout: 3 - nexio: - url: jdbc:db2://10.11.1.90:50000/mc - user: db2admin - password: password - hsm: - url: jdbc:db2://10.11.1.89:51500/tsmdb1 - user: tsminst1 - password: tsminst1 - planair: - url: jdbc:sqlserver://10.11.254.86;databaseName=PA_Vivantis; - user: MAM - password: VDani -services: - ffmpeg: - execurable-location: /opt/ffmpeg/ffmpeg - peablebeach: - template-root: configuration/soap - mediacube: - proxy-root: /opt - nexio: - host: 10.10.1.55 - collection-name: nexioclips - use-mos-gateway: true - disabled: true - octopus: - api: - address: http://10.10.1.11/api/v1 - user: mama - password: napocska - rundowns-collection-name: rundowns - stories-collection-name: stories - folders-collection-name: storyfolders -jobs: - nexio-track: false - randomize-archives: false - scheduled-execution: false - validate-transfers: false - copy-buffer-size: 32768 - scheduled-execution-disabled: true - randomize-archives: false -tsm: - randomize-archives: false - delimiter: / - node-name: JOBENGINE - fs-name: /JOBENGINE - alternate-fs-name: /JOBENGINE - hl-name: /JOBENGINE - \ No newline at end of file diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/config.ini b/server/-product/production/MEDIAVIVANTIS/configuration/config.ini index 58957707..fd4c203b 100644 --- a/server/-product/production/MEDIAVIVANTIS/configuration/config.ini +++ b/server/-product/production/MEDIAVIVANTIS/configuration/config.ini @@ -1,93 +1,9 @@ -#2021-02-06 -osgi.bundles=reference\:file\:cglib_2.2.2.jar@4,\ -reference\:file\:com.fasterxml.jackson.core.jackson-annotations_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.core.jackson-core_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.core.jackson-databind_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.datatype.jackson-datatype-joda_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-base_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.dataformat.jackson-dataformat-yaml_2.4.5.jar@4,\ -reference\:file\:com.fasterxml.jackson.module.jackson-module-jaxb-annotations_2.4.5.jar@4,\ -reference\:file\:com.ibm.db2.jcc_1.4.0.jar@4,\ -reference\:file\:com.ibm.nosql_4.19.26.jar@4,\ -reference\:file\:com.microsoft.sqlserver.sqljdbc_6.0.8112.100.jar@4,\ -reference\:file\:com.sun.jna_4.2.0.jar@4,\ -reference\:file\:groovy_3.0.3.jar@4,\ -reference\:file\:io.humble.video-arch-x86_64-pc-linux-gnu6_0.2.1.jar@4,\ -reference\:file\:io.humble.video-arch-x86_64-w64-mingw32_0.2.1.jar@4,\ -reference\:file\:io.humble.video-noarch_0.2.1.jar@4,\ -reference\:file\:javax.annotation-api_1.2.0.jar@4,\ -reference\:file\:javax.mail_1.5.0.b01.jar@4,\ -reference\:file\:javax.servlet-api_3.1.0.jar@4,\ -reference\:file\:javax.ws.rs-api_2.0.1.jar@4,\ -reference\:file\:jcifs_1.3.17.jar@4,\ -reference\:file\:joda-time_2.2.0.jar@4,\ -reference\:file\:junit_4.12.0.jar@4,\ -reference\:file\:org.apache.aries.spifly.dynamic.bundle_1.0.8.jar@4,\ -reference\:file\:org.apache.aries.util_1.0.0.jar@4,\ -reference\:file\:org.apache.commons.beanutils_1.8.3.jar@4,\ -reference\:file\:org.apache.commons.codec_1.6.0.v201305230611.jar@4,\ -reference\:file\:org.apache.commons.collections_3.2.2.v201511171945.jar@4,\ -reference\:file\:org.apache.commons.digester_3.2.0.jar@4,\ -reference\:file\:org.apache.commons.io_2.6.0.jar@4,\ -reference\:file\:org.apache.commons.lang_2.6.0.v201404270220.jar@4,\ -reference\:file\:org.apache.commons.net_3.6.0.jar@4,\ -reference\:file\:org.apache.felix.gogo.command_0.10.0.jar@4,\ -reference\:file\:org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar@4,\ -reference\:file\:org.apache.felix.gogo.shell_0.10.0.v201212101605.jar@4,\ -reference\:file\:org.apache.httpcomponents.httpclient_4.5.2.v20161115-1643.jar@4,\ -reference\:file\:org.apache.httpcomponents.httpcore_4.4.4.v20161115-1643.jar@4,\ -reference\:file\:org.apache.logging.log4j.api_2.8.2.jar@1\:start,\ -reference\:file\:org.apache.logging.log4j.core_2.8.2.jar@4,\ -reference\:file\:org.apache.logging.log4j.slf4j-impl_2.8.2.jar@4,\ -reference\:file\:org.apache.servicemix.bundles.quartz_2.3.0.2.jar@4,\ -reference\:file\:org.eclipse.equinox.common_3.8.0.v20160509-1230.jar@2\:start,\ -reference\:file\:org.eclipse.equinox.console_1.1.200.v20150929-1405.jar@4,\ -reference\:file\:org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar@1\:start,\ -reference\:file\:org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar@4,\ -reference\:file\:org.eclipse.equinox.util_1.0.500.v20130404-1337.jar@4,\ -reference\:file\:org.eclipse.jetty.client_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.deploy_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.http_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.io_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.osgi.boot_9.3.9.v20160517.jar@4\:start,\ -reference\:file\:org.eclipse.jetty.schemas_3.1.0.jar@4,\ -reference\:file\:org.eclipse.jetty.security_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.server_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.servlet_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.util_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.webapp_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.api_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.client_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.common_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.server_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.websocket.servlet_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.jetty.xml_9.3.9.v20160517.jar@4,\ -reference\:file\:org.eclipse.osgi.services_3.2.100.v20100503.jar@4,\ -reference\:file\:org.hamcrest.core_1.3.0.v201303031735.jar@4,\ -reference\:file\:org.jboss.resteasy.client_3.0.11.Final.jar@4,\ -reference\:file\:org.jboss.resteasy.jaxb-provider_3.0.11.Final.jar@4,\ -reference\:file\:org.jboss.resteasy.jaxrs_3.0.11.Final.jar@4,\ -reference\:file\:org.jboss.resteasy.jaxrs-api_3.0.11.Final.jar@4,\ -reference\:file\:org.jmock_2.6.0.jar@4,\ -reference\:file\:org.jmock.junit4_2.6.0.jar@4,\ -reference\:file\:org.mybatis.mybatis_3.5.2.jar@4,\ -reference\:file\:org.objectweb.asm_5.1.0.v20160914-0701.jar@4,\ -reference\:file\:org.objectweb.asm.commons_5.0.1.v201404251740.jar@4,\ -reference\:file\:org.objectweb.asm.tree_5.1.0.v20160914-0701.jar@4,\ -reference\:file\:org.omnifaces_3.4.1.jar@4,\ -reference\:file\:org.slf4j.jcl_1.7.2.v20130115-1340.jar@4,\ -reference\:file\:slf4j.api_1.7.24.jar@4,\ -reference\:file\:slf4j.simple_1.7.2.jar@4,\ -reference\:file\:user.commons.log4j2_1.0.0.jar@4,\ -reference\:file\:user.commons.zk_8.0.3.jar@4,\ -reference\:file\:user.jobengine.osgi.commons_1.0.0.jar@4\:start,\ -reference\:file\:user.jobengine.osgi.db_1.0.0.jar@4,\ -reference\:file\:user.jobengine.osgi.server_1.0.0.jar@4,\ -reference\:file\:user.jobengine.osgi.services_1.0.0.jar@4,\ -reference\:file\:user.mediacube.gui_1.0.0.jar@4,\ -reference\:file\:user.mediacube.metadata_1.0.0.jar@4,\ -reference\:file\:user.tsm.client_1.2.0.jar@4 +#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser +#Wed Feb 10 16:05:17 CET 2021 +osgi.bundles=reference\:file\:cglib_2.2.2.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-annotations_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-core_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.core.jackson-databind_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.dataformat.jackson-dataformat-yaml_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.datatype.jackson-datatype-joda_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-base_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider_2.4.5.jar@4,reference\:file\:com.fasterxml.jackson.module.jackson-module-jaxb-annotations_2.4.5.jar@4,reference\:file\:com.ibm.db2.jcc_1.4.0.jar@4,reference\:file\:com.ibm.nosql_4.19.26.jar@4,reference\:file\:com.microsoft.sqlserver.sqljdbc_6.0.8112.100.jar@4,reference\:file\:com.sun.jna_4.2.0.jar@4,reference\:file\:groovy_3.0.3.jar@4,reference\:file\:io.humble.video-arch-x86_64-pc-linux-gnu6_0.2.1.jar@4,reference\:file\:io.humble.video-arch-x86_64-w64-mingw32_0.2.1.jar@4,reference\:file\:io.humble.video-noarch_0.2.1.jar@4,reference\:file\:javax.annotation-api_1.2.0.jar@4,reference\:file\:javax.mail_1.5.0.b01.jar@4,reference\:file\:javax.servlet-api_3.1.0.jar@4,reference\:file\:javax.ws.rs-api_2.0.1.jar@4,reference\:file\:jcifs_1.3.17.jar@4,reference\:file\:joda-time_2.2.0.jar@4,reference\:file\:junit_4.12.0.jar@4,reference\:file\:org.apache.aries.spifly.dynamic.bundle_1.0.8.jar@4,reference\:file\:org.apache.aries.util_1.0.0.jar@4,reference\:file\:org.apache.commons.beanutils_1.8.3.jar@4,reference\:file\:org.apache.commons.collections_3.2.2.jar@4,reference\:file\:org.apache.commons.digester_3.2.0.jar@4,reference\:file\:org.apache.commons.io_2.6.0.jar@4,reference\:file\:org.apache.commons.lang_2.6.0.jar@4,reference\:file\:org.apache.commons.net_3.6.0.jar@4,reference\:file\:org.apache.felix.gogo.command_0.12.0.jar@4,reference\:file\:org.apache.felix.gogo.runtime_0.12.0.jar@4,reference\:file\:org.apache.felix.gogo.shell_0.12.0.jar@4,reference\:file\:org.apache.httpcomponents.httpclient_4.2.6.jar@4,reference\:file\:org.apache.httpcomponents.httpcore_4.2.5.jar@4,reference\:file\:org.apache.logging.log4j.api_2.8.2.jar@1\:start,reference\:file\:org.apache.logging.log4j.core_2.8.2.jar@4,reference\:file\:org.apache.logging.log4j.slf4j-impl_2.8.2.jar@4,reference\:file\:org.apache.servicemix.bundles.quartz_2.3.0.2.jar@4,reference\:file\:org.eclipse.equinox.common_3.8.0.v20160509-1230.jar@2\:start,reference\:file\:org.eclipse.equinox.console_1.1.200.v20150929-1405.jar@4,reference\:file\:org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar@1\:start,reference\:file\:org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar@4,reference\:file\:org.eclipse.equinox.util_1.0.500.v20130404-1337.jar@4,reference\:file\:org.eclipse.jetty.client_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.deploy_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.http_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.io_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.osgi.boot_9.3.9.v20160517.jar@4\:start,reference\:file\:org.eclipse.jetty.schemas_3.1.0.jar@4,reference\:file\:org.eclipse.jetty.security_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.server_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.servlet_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.util_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.webapp_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.api_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.client_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.common_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.server_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.websocket.servlet_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.jetty.xml_9.3.9.v20160517.jar@4,reference\:file\:org.eclipse.osgi.services_3.2.100.v20100503.jar@4,reference\:file\:org.hamcrest.core_1.3.0.jar@4,reference\:file\:org.jboss.resteasy.client_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxb-provider_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxrs_3.0.11.Final.jar@4,reference\:file\:org.jboss.resteasy.jaxrs-api_3.0.11.Final.jar@4,reference\:file\:org.jmock_2.6.0.jar@4,reference\:file\:org.jmock.junit4_2.6.0.jar@4,reference\:file\:org.mybatis.mybatis_3.5.2.jar@4,reference\:file\:org.objectweb.asm_5.0.1.jar@4,reference\:file\:org.objectweb.asm.commons_5.0.1.jar@4,reference\:file\:org.objectweb.asm.tree_5.0.1.jar@4,reference\:file\:org.omnifaces_3.4.1.jar@4,reference\:file\:slf4j.api_1.7.24.jar@4,reference\:file\:slf4j.simple_1.7.2.jar@4,reference\:file\:user.commons.log4j2_1.0.0.jar@4,reference\:file\:user.commons.zk_8.0.3.jar@4,reference\:file\:user.jobengine.osgi.commons_1.0.0.jar@4\:start,reference\:file\:user.jobengine.osgi.db_1.0.0.jar@4,reference\:file\:user.jobengine.osgi.server_1.0.0.jar@4,reference\:file\:user.jobengine.osgi.services_1.0.0.jar@4,reference\:file\:user.mediacube.gui_1.0.0.jar@4,reference\:file\:user.mediacube.metadata_1.0.0.jar@4,reference\:file\:user.tsm.client_1.2.0.jar@4 equinox.use.ds=true osgi.bundles.defaultStartLevel=4 osgi.framework=file\:plugins/org.eclipse.osgi_3.11.2.v20161107-1947.jar +osgi.framework.extensions= +eclipse.p2.data.area=@config.dir/../p2 +eclipse.p2.profile=DefaultProfile diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/etc/gosh_profile b/server/-product/production/MEDIAVIVANTIS/configuration/etc/gosh_profile new file mode 100644 index 00000000..1c659f49 --- /dev/null +++ b/server/-product/production/MEDIAVIVANTIS/configuration/etc/gosh_profile @@ -0,0 +1 @@ +prompt=mc> \ No newline at end of file diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/log4j2.xml b/server/-product/production/MEDIAVIVANTIS/configuration/log4j2.xml deleted file mode 100644 index e586e5b7..00000000 --- a/server/-product/production/MEDIAVIVANTIS/configuration/log4j2.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - log/mediacube.log - /opt/log/$${date:yyyy-MM}/mediacube-%d{MM-dd-yyyy}-%i.log.gz - /opt/log/mediacube-err.log - /opt/log/$${date:yyyy-MM}/mediacube-err-%d{MM-dd-yyyy}-%i.log.gz - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/maestro.json b/server/-product/production/MEDIAVIVANTIS/configuration/maestro.json deleted file mode 100644 index aa7778a6..00000000 --- a/server/-product/production/MEDIAVIVANTIS/configuration/maestro.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "sourceStoreUri": { - "name": "Default", - "protocol": "LOCAL", - "uri": "/mnt/NLE", - "fileFilter": "*.mxf", - "showDirectories": true - }, - "alternateSourceStoreUris": - [ - { - "name": "NLE1", - "protocol": "LOCAL", - "uri": "/mnt/NLE/NLE1", - "fileFilter": "*.mxf", - "showDirectories": true - }, - { - "name": "NLE2", - "protocol": "LOCAL", - "uri": "/mnt/NLE/NLE2", - "fileFilter": "*.mxf", - "showDirectories": true - }, - { - "name": "NLE3", - "protocol": "LOCAL", - "uri": "/mnt/NLE/NLE3", - "fileFilter": "*.mxf", - "showDirectories": true - }, - { - "name": "NLE4", - "protocol": "LOCAL", - "uri": "/mnt/NLE/NLE4", - "fileFilter": "*.mxf", - "showDirectories": true - }, - { - "name": "POLC", - "protocol": "LOCAL", - "uri": "/mnt/POLC", - "fileFilter": "*.mxf", - "showDirectories": true - } - ], - "targets": - [ - { - "name": "FINISHED_SHOWS", - "killDateDays": 7, - "storeUri": { - "protocol": "LOCAL", - "uri": "/mnt/PROMISE/FINISHED_SHOWS" - } - } - ] -} - - - diff --git a/server/-product/production/MEDIAVIVANTIS/jobs/executors.xml b/server/-product/production/MEDIAVIVANTIS/jobs/executors.xml index 832e9fb0..8cd7c04c 100644 --- a/server/-product/production/MEDIAVIVANTIS/jobs/executors.xml +++ b/server/-product/production/MEDIAVIVANTIS/jobs/executors.xml @@ -1,24 +1,41 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/MEDIAVIVANTIS/jobs/schedules.json b/server/-product/production/MEDIAVIVANTIS/jobs/schedules.json index 24f9e69b..b500c0c8 100644 --- a/server/-product/production/MEDIAVIVANTIS/jobs/schedules.json +++ b/server/-product/production/MEDIAVIVANTIS/jobs/schedules.json @@ -1,137 +1,300 @@ {"joblist":[ { - "active": false, + "template": "cancelable.xml" + }, + { + "active": true, + "executeimmediate": true, + "name" : "OCTOPUS adatok szinkronizálása", + "template": "sync-octopus.xml", + "cronexpression": "0/30 * * * * ?", + "parameters": [ + {"name": "includeArchived", "value": false, "type": "java.lang.Boolean"} + ] + }, + { + "active": true, "executeimmediate": false, - "name" : "Rekurzív archiválás a POLC/FINISHED_SHOWS mappából", - "template": "archive-recursive.xml", - "cronexpression": "0 */1 * * * ?", + "name" : "Limitált archiválás az ISILON/ARCHIVE mappából", + "template": "archive-limited.xml", + "cronexpression": "0 0 6-22/1 * * ?", "parameters": [ - {"name": "sourcePath", "value": "/mnt/POLC/FINISHED_SHOWS", "type": "java.lang.String"}, - {"name": "killDateDays", "value": 1, "type": "java.lang.Integer"}, - {"name": "limit", "value": 1, "type": "java.lang.Integer"} - ] + {"name": "sourcePath", "value": "/mnt/ISILON/ARCHIVE", "type": "java.lang.String"}, + {"name": "killDateDays", "value": 1, "type": "java.lang.Integer"}, + {"name": "limit", "value": 20, "type": "java.lang.Integer"} + ] }, { - "active": false, + "active": true, "executeimmediate": false, - "name" : "Párhuzamosított teszt folyamat", - "template": "fake-noparams.xml", - "cronexpression": "0 40 22 * * ?", - "parameters": [ {"name": "itemID", "value": 1, "type": "java.lang.Long"} ] + "name" : "Archiválás az ISILON/ARCHIVE mappából", + "template": "archive-ondemand.xml", + "cronexpression": "0 0 1 * * ?", + "parameters": [ + {"name": "sourcePath", "value": "/mnt/ISILON/ARCHIVE", "type": "java.lang.String"}, + {"name": "killDateDays", "value": 1, "type": "java.lang.Integer"}, + {"name": "limit", "value": 0, "type": "java.lang.Integer"} + ] }, { - "template": "cancelable.xml", - "parameters": [ {"name": "param", "value": 1, "type": "java.lang.Integer"} ] - }, + "active": true, + "executeimmediate": false, + "name" : "PROXY pótlás FFASTRANS 71", + "template": "sys-recreate-lowres-71.xml", + "cronexpression": "0 * * * * ?", + "parameters": [ + {"name": "localLowresPath", "value": "/mnt/FIXTRANSCODER-71/OUTPUT", "type": "java.lang.String" }, + {"name": "transcoderAddress", "value": "http://10.10.1.71:65445/api/json/v1/", "type": "java.lang.String"}, + {"name": "globalRetrievePath", "value": "file://10.10.1.30/transcode", "type": "java.lang.String"}, + {"name": "localRetrievePath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String"}, + {"name": "localHiresPath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String" }, + {"name": "globalHiresPath", "value": "L:\\transcode", "type": "java.lang.String" }, + {"name": "transcoderTemplateName", "value": "MAM_proxy", "type": "java.lang.String"} + ] + }, { - "active": false, + "active": true, + "executeimmediate": false, + "name" : "PROXY pótlás FFASTRANS 72", + "template": "sys-recreate-lowres-72.xml", + "cronexpression": "10 * * * * ?", + "parameters": [ + {"name": "localLowresPath", "value": "/mnt/FIXTRANSCODER-72/OUTPUT", "type": "java.lang.String" }, + {"name": "transcoderAddress", "value": "http://10.10.1.72:65445/api/json/v1/", "type": "java.lang.String"}, + {"name": "globalRetrievePath", "value": "file://10.10.1.30/transcode", "type": "java.lang.String"}, + {"name": "localRetrievePath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String"}, + {"name": "localHiresPath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String" }, + {"name": "globalHiresPath", "value": "L:\\transcode", "type": "java.lang.String" }, + {"name": "transcoderTemplateName", "value": "MAM_proxy", "type": "java.lang.String"} + ] + }, + { + "active": true, + "executeimmediate": false, + "name" : "PROXY pótlás FFASTRANS 73", + "template": "sys-recreate-lowres-73.xml", + "cronexpression": "20 * * * * ?", + "parameters": [ + {"name": "localLowresPath", "value": "/mnt/FIXTRANSCODER-73/OUTPUT", "type": "java.lang.String" }, + {"name": "transcoderAddress", "value": "http://10.10.1.73:65445/api/json/v1/", "type": "java.lang.String"}, + {"name": "globalRetrievePath", "value": "file://10.10.1.30/transcode", "type": "java.lang.String"}, + {"name": "localRetrievePath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String"}, + {"name": "localHiresPath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String" }, + {"name": "globalHiresPath", "value": "L:\\transcode", "type": "java.lang.String" }, + {"name": "transcoderTemplateName", "value": "MAM_proxy", "type": "java.lang.String"} + ] + }, + { + "active": true, "executeimmediate": false, - "name" : "HSM migrálás", - "template": "migrate-hsm.xml", - "cronexpression": "0 0 */1 * * ?", + "name" : "PROXY pótlás FFASTRANS 74", + "template": "sys-recreate-lowres-74.xml", + "cronexpression": "30 * * * * ?", "parameters": [ - {"name": "sourceLocation", "value": "", "type": "java.lang.String"}, - {"name": "targetLocation", "value": "/mediacube/data/ARCHIVE", "type": "java.lang.String"} + {"name": "localLowresPath", "value": "/mnt/FIXTRANSCODER-74/OUTPUT", "type": "java.lang.String" }, + {"name": "transcoderAddress", "value": "http://10.10.1.74:65445/api/json/v1/", "type": "java.lang.String"}, + {"name": "globalRetrievePath", "value": "file://10.10.1.30/transcode", "type": "java.lang.String"}, + {"name": "localRetrievePath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String"}, + {"name": "localHiresPath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String" }, + {"name": "globalHiresPath", "value": "L:\\transcode", "type": "java.lang.String" }, + {"name": "transcoderTemplateName", "value": "MAM_proxy", "type": "java.lang.String"} ] }, { - "active": false, - "executeimmediate": true, - "name" : "Limitált archiválás az PROMISE/ARCHIVE mappából", - "template": "archive-limited.xml", - "cronexpression": "0 */10 * * * ?", + "name" : "SYS: create-lowres-ondemand", + "template": "create-lowres-ondemand.xml", "parameters": [ - {"name": "sourcePath", "value": "/mnt/PROMISE/ARCHIVE", "type": "java.lang.String"}, - {"name": "globalSourcePath", "value": "\\\\10.11.1.100\\PROMISE\\ARCHIVE", "type": "java.lang.String"}, - {"name": "transcoderTargetPath", "value": "/mnt/PROMISE/TRANSCODER/FFASTRANSCODER/Out", "type": "java.lang.String"}, - {"name": "killDateDays", "value": -1, "type": "java.lang.Integer"}, - {"name": "limit", "value": 10, "type": "java.lang.Integer"} + {"name": "globalRetrievePath", "value": "file://10.10.1.30/transcode", "type": "java.lang.String"}, + {"name": "localRetrievePath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String"}, + {"name": "localHiresPath", "value": "/mediacube/data/lowres/www/video/IFT3/transcode", "type": "java.lang.String" }, + {"name": "globalHiresPath", "value": "L:\\transcode", "type": "java.lang.String" }, + {"name": "localLowresPath", "value": "/mnt/FIXTRANSCODER/OUTPUT", "type": "java.lang.String" }, + {"name": "transcoderAddress", "value": "http://10.10.1.74:65445/api/json/v1/", "type": "java.lang.String"}, + {"name": "transcoderTemplateName", "value": "MAM_proxy", "type": "java.lang.String"} ] }, { - "active": false, - "executeimmediate": true, - "name" : "Limitált archiválás a /mediacube/data/ARCHIVE mappából", - "template": "archive-limited.xml", - "cronexpression": "0 */10 * * * ?", + "active": true, + "executeimmediate": false, + "name" : "Lejárt ISILON/TQC/CHECK/KESZ anyagok törlése", + "template": "delete-materials.xml", + "cronexpression": "0 0 8 * * ?", "parameters": [ - {"name": "sourcePath", "value": "/mediacube/data/ARCHIVE", "type": "java.lang.String"}, - {"name": "globalSourcePath", "value": "\\\\10.11.1.90\\data\\ARCHIVE", "type": "java.lang.String"}, - {"name": "transcoderTargetPath", "value": "/mnt/PROMISE/TRANSCODER/FFASTRANSCODER/Out", "type": "java.lang.String"}, - {"name": "killDateDays", "value": -1, "type": "java.lang.Integer"}, - {"name": "limit", "value": 1000, "type": "java.lang.Integer"} + {"name": "sourcePath", "value": "/mnt/ISILON/TQC/CHECK/KESZ", "type": "java.lang.String"} ] - }, + }, { "active": true, - "executeimmediate": true, - "name" : "Lejárt /mediacube/data/ARCHIVE anyagok törlése", + "executeimmediate": false, + "name" : "Lejárt ISILON/TQC/PROMO/KESZ anyagok törlése", "template": "delete-materials.xml", - "cronexpression": "0 */10 * * * ?", + "cronexpression": "0 0 6 * * ?", "parameters": [ - {"name": "sourcePath", "value": "/mediacube/data/ARCHIVE", "type": "java.lang.String"} + {"name": "sourcePath", "value": "/mnt/ISILON/TQC/PROMO/KESZ", "type": "java.lang.String"} ] }, { - "active": false, - "executeimmediate": true, - "name" : "Lejárt /mediacube/data/OMARCHIVE anyagok törlése", + "active": true, + "executeimmediate": false, + "name" : "Lejárt ISILON/TQC/REKLAM/KESZ anyagok törlése", "template": "delete-materials.xml", - "cronexpression": "0 */10 * * * ?", + "cronexpression": "0 0 7 * * ?", "parameters": [ - {"name": "sourcePath", "value": "/mediacube/data/OMARCHIVE", "type": "java.lang.String"} + {"name": "sourcePath", "value": "/mnt/ISILON/TQC/REKLAM/KESZ", "type": "java.lang.String"} ] }, { "active": true, - "executeimmediate": true, - "name" : "Lejárt /PROMISE/ARCHIVE anyagok törlése", + "executeimmediate": false, + "name" : "Lejárt ISILON/ARCHIVE anyagok törlése", "template": "delete-materials.xml", - "cronexpression": "0 */10 * * * ?", + "cronexpression": "0 0 5 * * ?", "parameters": [ - {"name": "sourcePath", "value": "/mnt/PROMISE/ARCHIVE", "type": "java.lang.String"} + {"name": "sourcePath", "value": "/mnt/ISILON/ARCHIVE", "type": "java.lang.String"} ] }, { - "active": false, + "active": true, "executeimmediate": false, - "name" : "Lejárt /POLC/FINISHED_SHOWS anyagok törlése", + "name" : "Lejárt ISILON/OCTOPUS/_NAPI_MEGTEKINTO anyagok törlése", "template": "delete-materials.xml", - "cronexpression": "0 * 11 * * ?", + "cronexpression": "0 0 22 * * ?", + "parameters": [ + {"name": "sourcePath", "value": "/mnt/ISILON/OCTOPUS/_NAPI_MEGTEKINTO", "type": "java.lang.String"} + ] + }, + { + "active": true, + "executeimmediate": false, + "name" : "Lejárt ISISLON/PROMO_NLE mappák törlése", + "template": "delete-promo-materials.xml", + "cronexpression": "0 0 6 * * ?", "parameters": [ - {"name": "sourcePath", "value": "/mnt/POLC/FINISHED_SHOWS", "type": "java.lang.String"} + {"name": "sourcePath", "value": "/mnt/ISILON/PROMO_NLE", "type": "java.lang.String"} ] }, { "active": true, + "executeimmediate": false, + "name" : "NEXIO bejátszó anyagok másolása az ISILON/ARCHIVE mappába", + "template": "copyforarchive-nexio-materials.xml", + "cronexpression": "0 0 10 * * ?", + "parameters": [ + {"name": "nexioPort", "value": 2098, "type": "java.lang.Integer"}, + {"name": "nexioUserName", "value": "administrator", "type": "java.lang.String"}, + {"name": "nexioPassword", "value": "system", "type": "java.lang.String"}, + {"name": "archiveFtp", "value": "ftp://10.10.1.100/ARCHIVE", "type": "java.lang.String"}, + {"name": "archiveUserName", "value": "mediacube", "type": "java.lang.String"}, + {"name": "archivePassword", "value": "Broadca5T", "type": "java.lang.String"}, + {"name": "daysBeforeNow", "value": 1, "type": "java.lang.Integer"}, + {"name": "nexioKillDateDays", "value": 21, "type": "java.lang.Integer"}, + {"name": "nexioAgency", "value": "ARCHIVED", "type": "java.lang.String"} + ] + }, + { + "active": true, + "executeimmediate": false, + "name" : "NEXIO visszarögzített anyagok másolása az ISILON/ARCHIVE mappába", + "template": "copyforarchive-nexio-recordings.xml", + "cronexpression": "0 0 12 * * ? *", + "parameters": [ + {"name": "nexioPort", "value": 2098, "type": "java.lang.Integer"}, + {"name": "nexioUserName", "value": "administrator", "type": "java.lang.String"}, + {"name": "nexioPassword", "value": "system", "type": "java.lang.String"}, + {"name": "archiveFtp", "value": "ftp://10.10.1.100/ARCHIVE", "type": "java.lang.String"}, + {"name": "archiveUserName", "value": "mediacube", "type": "java.lang.String"}, + {"name": "archivePassword", "value": "Broadca5T", "type": "java.lang.String"}, + {"name": "filterAgencies", "value": "schedule-rec", "type": "java.lang.String"}, + {"name": "limit", "value": 30, "type": "java.lang.Integer"}, + {"name": "nexioKillDateDays", "value": 7, "type": "java.lang.Integer"}, + {"name": "nexioAgency", "value": "HIRADO_ARCHIVED", "type": "java.lang.String"} + ] + }, + { + "active": true, + "executeimmediate": false, + "name" : "Híranyag statisztika importálása", + "template": "import-statistics.xml", + "cronexpression": "0 0 6 * * ?", + "parameters": [ + {"name": "daysBeforeNow", "value": 1, "type": "java.lang.Integer"} + ] + }, + { + "active": false, + "executeimmediate": true, + "name" : "TRAFFIC anyagok visszatöltése", + "template": "retrieve-traffic-missing-materials.xml", + "cronexpression": "0 0 0/1 1/1 * ? *", + "parameters": [ + {"name": "dbUrl", "value": "jdbc:sqlserver://10.10.1.45\\sql16;databaseName=PA_Echo;", "type": "java.lang.String"}, + {"name": "userName", "value": "MAM", "type": "java.lang.String"}, + {"name": "password", "value": "Echotv.hu", "type": "java.lang.String"}, + {"name": "lookupDays", "value": 7, "type": "java.lang.Integer"}, + {"name": "targetPath", "value": "/mnt/ISILON/PLAYOUT/IceGateway/Input", "type": "java.lang.String"}, + {"name": "killDateDays", "value": 10, "type": "java.lang.Integer"} + ] + }, + { + "active": false, "executeimmediate": true, - "name" : "Proxy generálás", - "template": "sys-recreate-lowres.xml", - "cronexpression": "0 */1 * * * ?", - "parameters": [ - {"name": "globalRetrievePath", "value": "file://10.11.1.90/data", "type": "java.lang.String"}, - {"name": "localRetrievePath", "value": "/mediacube/data", "type": "java.lang.String"}, - {"name": "localHiresPath", "value": "/mediacube/data", "type": "java.lang.String" }, - {"name": "globalHiresPath", "value": "\\\\10.11.1.90\\data", "type": "java.lang.String" }, - {"name": "localLowresPath", "value": "/mediacube/data/TRANSCODER_OUT", "type": "java.lang.String" }, - {"name": "transcoderAddress", "value": "http://10.11.1.111:65445/api/json/v1/", "type": "java.lang.String"}, - {"name": "transcoderTemplateName", "value": "MP4", "type": "java.lang.String"} + "name" : "Lejárt ISISLON/ARCHIVE_TEMP anyagok törlése", + "template": "delete-materials.xml", + "cronexpression": "0 0 0/1 1/1 * ? *", + "parameters": [ + {"name": "sourcePath", "value": "/mnt/ISILON/ARCHIVE_TEMP", "type": "java.lang.String"} + ] + }, + { + "active": true, + "executeimmediate": false, + "name" : "Lejárt NEXIO anyagok törlése", + "template": "delete-nexio-materials.xml", + "cronexpression": "0 0 6 * * ?", + "parameters": [ + {"name": "port", "value": 2098, "type": "java.lang.Integer"}, + {"name": "userName", "value": "administrator", "type": "java.lang.String"}, + {"name": "password", "value": "system", "type": "java.lang.String"}, + {"name": "filterAgencies", "value": "HIRADO_23_00,HIRADO_ARCHIVED,HIRADO_CLN", "type": "java.lang.String"}, + {"name": "gracePeriodDays", "value": 1, "type": "java.lang.Integer"}, + {"name": "notificationOnly", "value": false, "type": "java.lang.Boolean"} + ] + }, + { + "active": false, + "executeimmediate": false, + "name" : "Párhuzamosított teszt folyamat", + "template": "fake-concurrent.xml", + "cronexpression": "0/10 * * ? * *", + "parameters": [ {"name": "itemID", "value": 1, "type": "java.lang.Long"} ] + }, + { + "active": false, + "executeimmediate": false, + "name" : "Teszt folyamat", + "template": "fake.xml", + "cronexpression": "0/10 * * ? * *", + "parameters": [ {"name": "itemID", "value": 1, "type": "java.lang.Long"} ] + }, + { + "name" : "SYS: MORPHEUS 'missing materials' importálása", + "template": "import-morpheus-missing-materials.xml", + "parameters": [ + {"name": "csvFilePath", "value": "/mnt/MORPHEUS", "type": "java.lang.String"}, + {"name": "processedFolder", "value": "DONE", "type": "java.lang.String"}, + {"name": "targetPath", "value": "/mnt/ISILON/ARCHIVE_RESTORE", "type": "java.lang.String"} ] }, { "name" : "SYS: batch-retrieve-ondemand", "template": "batch-retrieve-ondemand.xml", - "active": false, - "executeimmediate": false }, { "name" : "SYS: retrieve-ondemand", "template": "retrieve-ondemand.xml", - "active": false, - "executeimmediate": false, "parameters": [ - {"name": "globalRetrievePath", "value": "file://10.11.1.100", "type": "java.lang.String"}, - {"name": "localRetrievePath", "value": "/mnt/PROMISE/", "type": "java.lang.String"}, + {"name": "globalRetrievePath", "value": "file://isilon.intra.echotv.hu", "type": "java.lang.String"}, + {"name": "localRetrievePath", "value": "/mnt/ISILON", "type": "java.lang.String"}, {"name": "materialOutputFolder", "value": "PLAYOUT_NLE", "type": "java.lang.String"}, {"name": "promoOutputFolder", "value": "PROMO_NLE", "type": "java.lang.String"}, {"name": "advertisementOutputFolder", "value": "REKLAM_NLE", "type": "java.lang.String"}, @@ -146,24 +309,28 @@ ] }, { - "name" : "SYS: common-copy", - "template": "common-copy.xml", - "active": false, - "executeimmediate": false + "name" : "sys: MORPHEUS 'missing materials' importálása", + "template": "sys-import-morpheus-missing-materials.xml", + "parameters": [ + {"name": "csvFilePath", "value": "/mnt/MORPHEUS", "type": "java.lang.String"}, + {"name": "processedFolder", "value": "DONE", "type": "java.lang.String"}, + {"name": "targetPath", "value": "/mnt/ISILON/PLAYOUT/Video", "type": "java.lang.String"} + ] }, { - "template": "create-lowres-ondemand.xml", - "active": false, - "executeimmediate": false, + "name" : "sys: MORPHEUS 'missing material' visszatöltése", + "template": "sys-retrieve-missing-material.xml", "parameters": [ - {"name": "globalRetrievePath", "value": "file://10.11.1.90/data", "type": "java.lang.String"}, - {"name": "localRetrievePath", "value": "/mediacube/data", "type": "java.lang.String"}, - {"name": "localHiresPath", "value": "/mediacube/data", "type": "java.lang.String" }, - {"name": "globalHiresPath", "value": "\\\\10.11.1.90\\data", "type": "java.lang.String" }, - {"name": "localLowresPath", "value": "/mediacube/data/TRANSCODER_OUT", "type": "java.lang.String" }, - {"name": "transcoderAddress", "value": "http://10.11.1.111:65445/api/json/v1/", "type": "java.lang.String"}, - {"name": "transcoderTemplateName", "value": "MP4", "type": "java.lang.String"} + {"name": "targetPath", "value": "/mnt/ISILON/PLAYOUT/Video", "type": "java.lang.String"}, + {"name": "globalRetrievePath", "value": "\\\\10.10.1.100\\BRAAVOS\\PLAYOUT\\Video", "type": "java.lang.String"}, + {"name": "morpheusDeviceID", "value": "ISILON", "type": "java.lang.String"}, + {"name": "dbUrl", "value": "jdbc:sqlserver://10.10.1.45;databaseName=PA_Echo;", "type": "java.lang.String"}, + {"name": "userName", "value": "MAM", "type": "java.lang.String"}, + {"name": "password", "value": "Echotv.hu", "type": "java.lang.String"}, + {"name": "targetMetadataPath", "value": "/mnt/ISILON/PLAYOUT/MorpheusGateway/Input", "type": "java.lang.String"} ] - }, - + } ]} + + + diff --git a/server/-product/production/MEDIAVIVANTIS/mediacube.bat b/server/-product/production/MEDIAVIVANTIS/mediacube.bat index a56d0950..64cbf781 100644 --- a/server/-product/production/MEDIAVIVANTIS/mediacube.bat +++ b/server/-product/production/MEDIAVIVANTIS/mediacube.bat @@ -6,11 +6,13 @@ java ^ -Dorg.eclipse.epp.logging.aeri.skipReports=true ^ -Declipse.ignoreApp=true ^ -Dosgi.noShutdown=true ^ --Dlog4j.configurationFile=configuration/log4j2.xml ^ --Djetty.home=configuration/jetty ^ +-Dlog4j.configurationFile=settings/log4j2.xml ^ +-Djetty.home=settings/test-jetty ^ -Djetty.etc.config.urls=jetty.xml,jetty-ssl.xml,jetty-ssl-context.xml,jetty-http.xml,jetty-https.xml ^ -Djava.io.tmpdir=tmp ^ +-Dfile.encoding=UTF-8 ^ +-Dgosh.home=configuration ^ -jar plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar ^ -Xms512m ^ -Xmx1024m ^ --console 5555 +-console diff --git a/server/-product/production/MEDIAVIVANTIS/settings/application.yaml b/server/-product/production/MEDIAVIVANTIS/settings/application.yaml index c584e2a4..fea1fa28 100644 --- a/server/-product/production/MEDIAVIVANTIS/settings/application.yaml +++ b/server/-product/production/MEDIAVIVANTIS/settings/application.yaml @@ -28,8 +28,6 @@ datasource: services: ffmpeg: execurable-location: /opt/ffmpeg/ffmpeg - peablebeach: - template-root: configuration/soap mediacube: proxy-root: /opt nexio: @@ -46,13 +44,9 @@ services: stories-collection-name: stories folders-collection-name: storyfolders jobs: - nexio-track: false - randomize-archives: false - scheduled-execution: false validate-transfers: false copy-buffer-size: 32768 scheduled-execution-disabled: true - randomize-archives: false tsm: randomize-archives: false delimiter: / diff --git a/server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-http.xml b/server/-product/production/MEDIAVIVANTIS/settings/jetty/http.xml similarity index 100% rename from server/-product/production/MEDIAVIVANTIS/configuration/jetty/jetty-http.xml rename to server/-product/production/MEDIAVIVANTIS/settings/jetty/http.xml diff --git a/server/-product/production/MEDIAVIVANTIS/settings/log4j2.xml b/server/-product/production/MEDIAVIVANTIS/settings/log4j2.xml index 62e8b78f..f388a6a6 100644 --- a/server/-product/production/MEDIAVIVANTIS/settings/log4j2.xml +++ b/server/-product/production/MEDIAVIVANTIS/settings/log4j2.xml @@ -1,21 +1,84 @@ - + - log/mediacube.log - /opt/log/$${date:yyyy-MM}/mediacube-%d{MM-dd-yyyy}-%i.log.gz - /opt/log/mediacube-err.log - /opt/log/$${date:yyyy-MM}/mediacube-err-%d{MM-dd-yyyy}-%i.log.gz + /opt/mediacube/log + ${logPath}/mediacube.log + ${logPath}/$${date:yyyy-MM}/mediacube-%d{MM-dd-yyyy}-%i.log.gz + ${logPath}/markered-mediacube.log + ${logPath}/$${date:yyyy-MM}/markered-mediacube-%d{MM-dd-yyyy}-%i.log.gz + ${logPath}/mediacube-err.log + ${logPath}/$${date:yyyy-MM}/mediacube-err-%d{MM-dd-yyyy}-%i.log.gz - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + \ No newline at end of file diff --git a/server/-product/production/MEDIAVIVANTIS/settings/mediacube.json b/server/-product/production/MEDIAVIVANTIS/settings/mediacube.json index c01d31f8..d413314a 100644 --- a/server/-product/production/MEDIAVIVANTIS/settings/mediacube.json +++ b/server/-product/production/MEDIAVIVANTIS/settings/mediacube.json @@ -1,5 +1,4 @@ { - "jobQueuePollInterval": 1000, "topTypeFilters": [ { "name": "Hír bejátszó", @@ -11,11 +10,26 @@ "color": "RED100", "icon": "ic_perm_camera_mic_black_18dp.png" }, + { + "name": "ECHO visszarögzített", + "color": "BROWN100", + "icon": "ic_group_work_black_18dp.png" + }, { "name": "Visszarögzített", "color": "BROWN100", "icon": "ic_group_work_black_18dp.png" }, + { + "name": "Muszter DEMO", + "color": "BROWN100", + "icon": "ic_group_work_black_18dp.png" + }, + { + "name": "Műsor CLEAN", + "color": "BROWN100", + "icon": "ic_group_work_black_18dp.png" + }, { "name": "Egyéb", "color": "YELLOW200", @@ -23,6 +37,11 @@ } ], "bottomTypeFilters": [ + { + "name": "ECHO műsor", + "color": "TEAL200", + "icon": "ic_theaters_black_18dp.png" + }, { "name": "Műsor", "color": "TEAL200", @@ -33,6 +52,11 @@ "color": "TEAL100", "icon": "ic_invert_colors_black_18dp.png" }, + { + "name": "ECHO promo", + "color": "INDIGO200", + "icon": "ic_picture_in_picture_black_18dp.png" + }, { "name": "Promo", "color": "INDIGO200", @@ -43,6 +67,11 @@ "color": "INDIGO100", "icon": "ic_bug_report_black_18dp.png" }, + { + "name": "ECHO reklám", + "color": "BLUE200", + "icon": "ic_picture_in_picture_alt_black_18dp.png" + }, { "name": "Reklám", "color": "BLUE200", @@ -56,22 +85,25 @@ ], "authentication": { "authEnabled": true, - "adHost": "intra.mediavivantis.hu", + "adHost": "10.10.254.11", "adNonSecurePort": 3268, - "adBaseDn": "DC=intra,DC=mediavivantis,DC=hu", + "adBaseDn": "DC=intra,DC=echotv,DC=hu", "adAdminMap": [ - "G_MV_U_MUSZAK", - "G_MV_U_INGEST" + "G_ECH_U_INFORMATIKUSOK", + "G_ECH_U_MUSZAKVEZETOK", + "ECH-ISILON-ADMINS" ], "adSubmitterMap": [ "G_ECH_U_INFORMATIKUSOK", "G_ECH_U_MUSZAKVEZETOK", - "ECH-ISILON-ADMINS" + "ECH-ISILON-ADMINS", + "G_ECH_U_PLAYOUT" ], "adEditorMap": [ "G_ECH_U_INFORMATIKUSOK", "G_ECH_U_MUSZAKVEZETOK", - "ECH-ISILON-ADMINS" + "ECH-ISILON-ADMINS", + "G_ECH_U_ARCHIVUM" ], "localAccounts": [ { diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-deployer.xml b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-deployer.xml new file mode 100644 index 00000000..ba61d105 --- /dev/null +++ b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-deployer.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern + .*/[^/]*servlet-api-[^/]*\.jar$|.*/javax.servlet.jsp.jstl-.*\.jar$|.*/org.apache.taglibs.taglibs-standard-impl-.*\.jar$ + + + + + + + + + + + jetty.deploy.monitoredPath + + / + + + + + + jetty.deploy.defaultsDescriptorPath + + /etc/webdefault.xml + + + + + + + + + + + + + + + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-http-redirect.xml b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-http-redirect.xml new file mode 100644 index 00000000..556f544d --- /dev/null +++ b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-http-redirect.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https + 8444 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-http.xml b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-http.xml new file mode 100644 index 00000000..f4f61bfa --- /dev/null +++ b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-http.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-https.xml b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-https.xml new file mode 100644 index 00000000..71a08377 --- /dev/null +++ b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-https.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + http/1.1 + + + + + + + + + + + + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-ssl-context.xml b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-ssl-context.xml new file mode 100644 index 00000000..e1edaf05 --- /dev/null +++ b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-ssl-context.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + / + + + + + / + + + + + + + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-ssl.xml b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-ssl.xml new file mode 100644 index 00000000..db6e2eb4 --- /dev/null +++ b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty-ssl.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty.xml b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty.xml new file mode 100644 index 00000000..c9afdb5f --- /dev/null +++ b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/jetty.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5000 + + + + diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/keystore b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/keystore new file mode 100644 index 00000000..95d7f4c7 Binary files /dev/null and b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/keystore differ diff --git a/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/localhost.jks b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/localhost.jks new file mode 100644 index 00000000..95d7f4c7 Binary files /dev/null and b/server/-product/production/MEDIAVIVANTIS/settings/test-jetty/localhost.jks differ diff --git a/server/user.jobengine.executors/amc/user/jobengine/server/steps/PBQuery.java b/server/user.jobengine.executors/amc/user/jobengine/server/steps/PBQuery.java index 3a09395f..3632868f 100644 --- a/server/user.jobengine.executors/amc/user/jobengine/server/steps/PBQuery.java +++ b/server/user.jobengine.executors/amc/user/jobengine/server/steps/PBQuery.java @@ -119,6 +119,12 @@ public class PBQuery { } + private Path getSOAPTemplate(String viewName) throws FileNotFoundException { + String configDir = SystemConfiguration.getInstance().getConfig("settings/soap"); + logger.info("Loading template {} from {}", viewName, configDir); + return Paths.get(configDir, viewName); + } + public void init(String primaryEndPoint, String primaryUserName, String primaryPassword, String secondaryEndPoint, String secondaryUserName, String secondaryPassword, int rangeForwardHours) throws Exception { this.primaryEndPoint = primaryEndPoint; @@ -152,8 +158,8 @@ public class PBQuery { DataInputStream is = null; try { URL url = new URL(endPoint); - httpclient.getCredentialsProvider().setCredentials(new AuthScope(url.getHost(), url.getPort(), null, "Digest"), - new UsernamePasswordCredentials(user, pwd)); + httpclient.getCredentialsProvider() + .setCredentials(new AuthScope(url.getHost(), url.getPort(), null, "Digest"), new UsernamePasswordCredentials(user, pwd)); HttpPost httppost = new HttpPost(url.toURI()); httppost.setHeader("soapaction", action); @@ -198,8 +204,7 @@ public class PBQuery { String xml = null; String soap = null; - String configDir = SystemConfiguration.getInstance().getConfig("settings/soap"); - Path template = Paths.get(configDir, GETCUSTOMVIEW); + Path template = getSOAPTemplate(GETCUSTOMVIEW); if (!template.toFile().exists()) throw new FileNotFoundException(template.toString()); @@ -249,8 +254,8 @@ public class PBQuery { String xml = null; String soap = null; - String configDir = SystemConfiguration.getInstance().getConfig("settings/soap"); - Path template = Paths.get(configDir, GETMEDIAUSAGEBYUTRANGE); + Path template = getSOAPTemplate(GETMEDIAUSAGEBYUTRANGE); + if (!template.toFile().exists()) throw new FileNotFoundException(template.toString());