Added a File Manager test with distributed configuration management
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/e32f2bb0 Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/e32f2bb0 Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/e32f2bb0 Branch: refs/heads/master Commit: e32f2bb0cec2c5908ce81bd55cf602d1655ad6fc Parents: d2f2d49 Author: Imesha Sudasingha <[email protected]> Authored: Sat Jul 29 20:51:35 2017 +0530 Committer: Imesha Sudasingha <[email protected]> Committed: Sat Jul 29 20:51:35 2017 +0530 ---------------------------------------------------------------------- config/pom.xml | 3 +- .../AbstractDistributedConfigurationTest.java | 51 +++++ .../AbstractDistributedConfigurationTest.java | 53 ----- .../DistributedConfigurationManagerTest.java | 23 ++- .../DistributedConfigurationPublisherTest.java | 17 ++ core/pom.xml | 7 +- filemgr/pom.xml | 4 +- .../TestDistributedXmlRpcFileManager.java | 200 +++++++++++++++++++ .../distributed/config/cmd-line-actions.xml | 38 ++++ .../distributed/config/cmd-line-options.xml | 85 ++++++++ .../distributed/config/config-publisher.xml | 42 ++++ .../distributed/config/filemgr.properties | 157 +++++++++++++++ filemgr/src/test/resources/filemgr.properties | 155 -------------- 13 files changed, 614 insertions(+), 221 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/pom.xml ---------------------------------------------------------------------- diff --git a/config/pom.xml b/config/pom.xml index 21d28d8..3380848 100644 --- a/config/pom.xml +++ b/config/pom.xml @@ -35,7 +35,6 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> @@ -138,4 +137,4 @@ </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java ---------------------------------------------------------------------- diff --git a/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java b/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java new file mode 100644 index 0000000..f8d421e --- /dev/null +++ b/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.oodt.config.test; + +import org.apache.curator.framework.CuratorFramework; +import org.apache.curator.test.TestingServer; +import org.apache.oodt.config.distributed.utils.CuratorUtils; +import org.junit.AfterClass; +import org.junit.BeforeClass; + +import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING; + +public abstract class AbstractDistributedConfigurationTest { + + protected static TestingServer zookeeper; + protected static CuratorFramework client; + + @BeforeClass + public static void setUp() throws Exception { + zookeeper = new TestingServer(); + zookeeper.start(); + + System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString()); + + client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString()); + client.start(); + } + + @AfterClass + public static void tearDown() throws Exception { + System.clearProperty(ZK_CONNECT_STRING); + + client.close(); + zookeeper.stop(); + } +} http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java ---------------------------------------------------------------------- diff --git a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java deleted file mode 100644 index 27174ba..0000000 --- a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.oodt.config.distributed; - -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.test.TestingServer; -import org.apache.oodt.config.distributed.utils.CuratorUtils; -import org.junit.AfterClass; -import org.junit.BeforeClass; - -import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING; - -public abstract class AbstractDistributedConfigurationTest { - - protected static final String CONFIG_PUBLISHER_XML = "config-publisher.xml"; - - protected static TestingServer zookeeper; - protected static CuratorFramework client; - - @BeforeClass - public static void setUp() throws Exception { - zookeeper = new TestingServer(); - zookeeper.start(); - - System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString()); - System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml"); - System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml"); - - client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString()); - client.start(); - } - - @AfterClass - public static void tearDown() throws Exception { - client.close(); - zookeeper.stop(); - } -} http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java ---------------------------------------------------------------------- diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java index d96767b..064d1c6 100644 --- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java +++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java @@ -21,9 +21,10 @@ import org.apache.commons.io.FileUtils; import org.apache.oodt.config.ConfigurationManager; import org.apache.oodt.config.distributed.cli.ConfigPublisher; import org.apache.oodt.config.distributed.utils.FilePathUtils; -import org.junit.AfterClass; +import org.apache.oodt.config.test.AbstractDistributedConfigurationTest; +import org.junit.After; import org.junit.Assert; -import org.junit.BeforeClass; +import org.junit.Before; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -49,11 +50,14 @@ import static org.junit.Assert.fail; */ public class DistributedConfigurationManagerTest extends AbstractDistributedConfigurationTest { - protected static List<DistributedConfigurationPublisher> publishers; + private static final String CONFIG_PUBLISHER_XML = "config-publisher.xml"; - @BeforeClass - public static void setUp() throws Exception { - AbstractDistributedConfigurationTest.setUp(); + private List<DistributedConfigurationPublisher> publishers; + + @Before + public void setUpTest() throws Exception { + System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml"); + System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml"); ConfigPublisher.main(new String[]{ "-connectString", zookeeper.getConnectString(), @@ -113,8 +117,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf } } - @AfterClass - public static void tearDown() throws Exception { + @After + public void tearDownTest() throws Exception { for (DistributedConfigurationPublisher publisher : publishers) { publisher.destroy(); @@ -144,6 +148,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf "-a", "clear" }); - AbstractDistributedConfigurationTest.tearDown(); + System.clearProperty("org.apache.oodt.cas.cli.action.spring.config"); + System.clearProperty("org.apache.oodt.cas.cli.option.spring.config"); } } http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java ---------------------------------------------------------------------- diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java index 24a43e3..b77683c 100644 --- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java +++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java @@ -19,7 +19,10 @@ package org.apache.oodt.config.distributed; import org.apache.commons.io.FileUtils; import org.apache.oodt.config.distributed.cli.ConfigPublisher; +import org.apache.oodt.config.test.AbstractDistributedConfigurationTest; +import org.junit.After; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -36,6 +39,20 @@ import java.util.Map; */ public class DistributedConfigurationPublisherTest extends AbstractDistributedConfigurationTest { + private static final String CONFIG_PUBLISHER_XML = "config-publisher.xml"; + + @Before + public void setUpTest() { + System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml"); + System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml"); + } + + @After + public void tearDownTest() { + System.clearProperty("org.apache.oodt.cas.cli.action.spring.config"); + System.clearProperty("org.apache.oodt.cas.cli.option.spring.config"); + } + @Test public void publishConfigurationTest() throws Exception { // Publishing configuration through CLI and verifying whether they were stored correctly http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/core/pom.xml ---------------------------------------------------------------------- diff --git a/core/pom.xml b/core/pom.xml index 118d171..b9f07e1 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -251,7 +251,6 @@ the License. <groupId>org.apache.curator</groupId> <artifactId>curator-test</artifactId> <version>3.3.0</version> - <scope>test</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> @@ -413,6 +412,12 @@ the License. <groupId>org.apache.solr</groupId> <artifactId>solr-solrj</artifactId> <version>6.2.1</version> + <exclusions> + <exclusion> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.tika</groupId> http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/pom.xml ---------------------------------------------------------------------- diff --git a/filemgr/pom.xml b/filemgr/pom.xml index 7e39f46..84d6198 100644 --- a/filemgr/pom.xml +++ b/filemgr/pom.xml @@ -116,7 +116,6 @@ <groupId>org.apache.lucene</groupId> <artifactId>lucene-queryparser</artifactId> </dependency> - <dependency> <groupId>org.apache.oodt</groupId> <artifactId>cas-cli</artifactId> @@ -236,6 +235,9 @@ <value>src/test/resources/test.logging.properties</value> </property> </systemProperties> + <environmentVariables> + <OODT_FILEMGR_HOME>${project.basedir}</OODT_FILEMGR_HOME> + </environmentVariables> <forkedProcessTimeoutInSeconds>0</forkedProcessTimeoutInSeconds> <redirectTestOutputToFile>true</redirectTestOutputToFile> <includes> http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java ---------------------------------------------------------------------- diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java new file mode 100644 index 0000000..afbac03 --- /dev/null +++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java @@ -0,0 +1,200 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.oodt.cas.filemgr.config.distributed; + +import org.apache.oodt.cas.filemgr.ingest.StdIngester; +import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys; +import org.apache.oodt.cas.filemgr.metadata.ProductMetKeys; +import org.apache.oodt.cas.filemgr.structs.Product; +import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException; +import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager; +import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient; +import org.apache.oodt.cas.metadata.Metadata; +import org.apache.oodt.cas.metadata.SerializableMetadata; +import org.apache.oodt.config.distributed.cli.ConfigPublisher; +import org.apache.oodt.config.test.AbstractDistributedConfigurationTest; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.URL; +import java.util.Collections; + +import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +public class TestDistributedXmlRpcFileManager extends AbstractDistributedConfigurationTest { + + private static final int FM_PORT = 9001; + private static final String CONF_PUBLISHER_XML = "distributed/config/config-publisher.xml"; + private static final String TRANSFER_SERVICE_FACTORY_CLASS = "org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory"; + + private XmlRpcFileManager fileManager; + + @Before + public void setUpTest() throws Exception { + System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/test/resources/distributed/config/cmd-line-actions.xml"); + System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/test/resources/distributed/config/cmd-line-options.xml"); + System.setProperty(ENABLE_DISTRIBUTED_CONFIGURATION, "true"); + + ConfigPublisher.main(new String[]{ + "-connectString", zookeeper.getConnectString(), + "-config", CONF_PUBLISHER_XML, + "-a", "publish" + }); + + try { + fileManager = new XmlRpcFileManager(FM_PORT); + } catch (Exception e) { + fail(e.getMessage()); + } + + ingestFile(); + } + + @Test + public void testDistributedConfigurationWithFileManager() { + XmlRpcFileManagerClient fmc = null; + try { + fmc = new XmlRpcFileManagerClient(new URL("http://localhost:" + FM_PORT)); + } catch (Exception e) { + fail(e.getMessage()); + } + + Metadata met = null; + try { + met = fmc.getMetadata(fmc.getProductByName("test.txt")); + } catch (CatalogException e) { + fail(e.getMessage()); + } + + assertNotNull(met); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID)); + assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME)); + assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE)); + assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS)); + assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS)); + + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES)); + + assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size()); + assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size()); + assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size()); + assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size()); + + URL refUrl = this.getClass().getResource("/ingest/test.txt"); + + String origPath = null; + try { + origPath = new File(refUrl.getFile()).getCanonicalPath(); + } catch (IOException e) { + fail(e.getMessage()); + } + assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS)); + assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS)); + + assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES)); + assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES)); + + try { + met = fmc.getReducedMetadata(fmc.getProductByName("test.txt"), Collections.EMPTY_LIST); + } catch (CatalogException e) { + fail(e.getMessage()); + } + + assertNotNull(met); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID)); + assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME)); + assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE)); + assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS)); + assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS)); + + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES)); + assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES)); + + assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size()); + assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size()); + assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size()); + assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size()); + + origPath = null; + try { + origPath = new File(refUrl.getFile()).getCanonicalPath(); + } catch (IOException e) { + fail(e.getMessage()); + } + assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS)); + assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS)); + + assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES)); + assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES)); + } + + private void ingestFile() { + StdIngester ingester = new StdIngester(TRANSFER_SERVICE_FACTORY_CLASS); + + try { + URL ingestUrl = this.getClass().getResource("/ingest"); + URL refUrl = this.getClass().getResource("/ingest/test.txt"); + URL metUrl = this.getClass().getResource("/ingest/test.txt.met"); + Metadata prodMet = new SerializableMetadata(new FileInputStream(new File(metUrl.getFile()))); + + // now add the right file location + prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(ingestUrl.getFile()).getCanonicalPath()); + prodMet.addMetadata(CoreMetKeys.FILENAME, "test.txt"); + prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile"); + ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(refUrl.getFile()), prodMet); + } catch (Exception e) { + fail(e.getMessage()); + } + } + + @After + public void tearDownTest() throws Exception { + if (fileManager != null) { + fileManager.shutdown(); + } + + ConfigPublisher.main(new String[]{ + "-connectString", zookeeper.getConnectString(), + "-config", CONF_PUBLISHER_XML, + "-a", "clear" + }); + + System.clearProperty("org.apache.oodt.cas.cli.action.spring.config"); + System.clearProperty("org.apache.oodt.cas.cli.option.spring.config"); + System.clearProperty(ENABLE_DISTRIBUTED_CONFIGURATION); + } +} http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml ---------------------------------------------------------------------- diff --git a/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml b/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml new file mode 100644 index 0000000..08f5415 --- /dev/null +++ b/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> + + <bean id="publish" class="org.apache.oodt.config.distributed.cli.CLIAction"> + <constructor-arg value="PUBLISH"/> + <property name="description" value="Publishes configuration to zookeeper"/> + </bean> + + <bean id="verify" class="org.apache.oodt.config.distributed.cli.CLIAction"> + <constructor-arg value="VERIFY"/> + <property name="description" value="Verifies configuration published to zookeeper"/> + </bean> + + <bean id="clear" class="org.apache.oodt.config.distributed.cli.CLIAction"> + <constructor-arg value="CLEAR"/> + <property name="description" value="Clears all published configuration from zookeeper"/> + </bean> +</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/cmd-line-options.xml ---------------------------------------------------------------------- diff --git a/filemgr/src/test/resources/distributed/config/cmd-line-options.xml b/filemgr/src/test/resources/distributed/config/cmd-line-options.xml new file mode 100644 index 0000000..698ad32 --- /dev/null +++ b/filemgr/src/test/resources/distributed/config/cmd-line-options.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> + + <bean id="connectStringOption" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="cs"/> + <property name="longOption" value="connectString"/> + <property name="description" value="Connect String to Zookeeper (ip1:port1,ip2:port2,..)"/> + <property name="hasArgs" value="true"/> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="publish" p:relation="REQUIRED"/> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="clear" p:relation="REQUIRED"/> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="verify" p:relation="REQUIRED"/> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler"> + <property name="applyToActions"> + <list> + <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction" + p:actionName="publish" p:methodName="setConnectString"/> + <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction" + p:actionName="verify" p:methodName="setConnectString"/> + <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction" + p:actionName="clear" p:methodName="setConnectString"/> + </list> + </property> + </bean> + </property> + </bean> + + <bean id="publisherXML" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"> + <property name="shortOption" value="c"/> + <property name="longOption" value="config"/> + <property name="description" value="Configuration publisher spring configuration XML"/> + <property name="hasArgs" value="true"/> + <property name="requirementRules"> + <list> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="publish" p:relation="OPTIONAL"/> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="clear" p:relation="OPTIONAL"/> + <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule" + p:actionName="verify" p:relation="OPTIONAL"/> + </list> + </property> + <property name="handler"> + <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler"> + <property name="applyToActions"> + <list> + <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction" + p:actionName="publish" p:methodName="setConfigFile"/> + <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction" + p:actionName="verify" p:methodName="setConfigFile"/> + <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction" + p:actionName="clear" p:methodName="setConfigFile"/> + </list> + </property> + </bean> + </property> + </bean> +</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/config-publisher.xml ---------------------------------------------------------------------- diff --git a/filemgr/src/test/resources/distributed/config/config-publisher.xml b/filemgr/src/test/resources/distributed/config/config-publisher.xml new file mode 100644 index 0000000..19e9f8c --- /dev/null +++ b/filemgr/src/test/resources/distributed/config/config-publisher.xml @@ -0,0 +1,42 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + + <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher"> + <constructor-arg value="FILE_MANAGER"/> + <property name="propertiesFiles"> + <map key-type="java.lang.String" value-type="java.lang.String"> + <entry key="src/test/resources/distributed/config/filemgr.properties" value="target/filemgr/etc/filemgr.properties"/> + <entry key="src/test/resources/test.logging.properties" value="target/filemgr/etc/logging.properties"/> + </map> + </property> + <property name="configFiles"> + <map key-type="java.lang.String" value-type="java.lang.String"> + <!-- Examples - Core--> + <entry key="src/test/resources/ingest/fmpolicy/elements.xml" value="target/filemgr/policy/oodt/elements.xml"/> + <entry key="src/test/resources/ingest/fmpolicy/product-types.xml" value="target/filemgr/policy/oodt/product-types.xml"/> + <entry key="src/test/resources/ingest/fmpolicy/product-type-element-map.xml" value="target/filemgr/policy/oodt/product-type-element-map.xml"/> + + <!-- Mime types XML --> + <entry key="src/test/resources/mime-types.xml" value="target/filemgr/policy/mime-types.xml"/> + </map> + </property> + </bean> +</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/filemgr.properties ---------------------------------------------------------------------- diff --git a/filemgr/src/test/resources/distributed/config/filemgr.properties b/filemgr/src/test/resources/distributed/config/filemgr.properties new file mode 100644 index 0000000..50d09a7 --- /dev/null +++ b/filemgr/src/test/resources/distributed/config/filemgr.properties @@ -0,0 +1,157 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Test Configuration properties for the File Manager + +# repository factory +filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory + +# catalog factory +filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory + +# data transfer factory +filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory + +# validation layer factory +filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory + +# xml rpc client configuration +org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20 +org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60 +#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0 +#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3 + +# data source catalog configuration +org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test +org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=sa +org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass= +org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver +org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false +org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20 +org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5 +org.apache.oodt.cas.filemgr.catalog.datasource.orderedValues=false +# set the following property to 'true' to allow dynamic metadata fields, +# effectively bypassing the validation layer. +# by default the property is false +#org.apache.oodt.cas.filemgr.catalog.datasource.lenientFields=true +# set the following property to true to enable the column "product_id" +# in table "products" to be of type string +#org.apache.oodt.cas.filemgr.catalog.datasource.productId.string=false + + +# mapped data source catalog configuration +org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties + +# science data catalog configuration +org.apache.oodt.cas.filemgr.catalog.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test +org.apache.oodt.cas.filemgr.catalog.science.jdbc.user=sa +org.apache.oodt.cas.filemgr.catalog.science.jdbc.pass= +org.apache.oodt.cas.filemgr.catalog.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver + +# lucene catalog configuration +org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=file:target/tmp +org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20 +org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60 +org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60 +org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20 + +# solr catalog configuration +org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8983/solr +#org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8080/solr +org.apache.oodt.cas.filemgr.catalog.solr.productSerializer=org.apache.oodt.cas.filemgr.catalog.solr.DefaultProductSerializer +org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.UUIDProductIdGenerator +#org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.NameProductIdGenerator + + +# data source repository manager configuration +org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test +org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=sa +org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass= +org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver + +# science data repository manager configuration +org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test +org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.user=sa +org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.pass= +org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver + +# XML repository manager configuration +org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[OODT_FILEMGR_HOME]/target/filemgr/policy/oodt + +# XML validation layer configuration +org.apache.oodt.cas.filemgr.validation.dirs=file:[OODT_FILEMGR_HOME]/target/filemgr/policy/oodt + +# set the following property to 'true' to allow dynamic metadata fields, +# effectively bypassing the validation layer. +# by default the property is false +#org.apache.oodt.cas.filemgr.catalog.lucene.lenientFields=true + +# data source validation layer configuration +org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test +org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=sa +org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass= +org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver +org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false + +# science data validation layer configuration +org.apache.oodt.cas.filemgr.validation.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test +org.apache.oodt.cas.filemgr.validation.science.jdbc.user=sa +org.apache.oodt.cas.filemgr.validation.science.jdbc.pass= +org.apache.oodt.cas.filemgr.validation.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver + +# remote data transfer configuration +org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024 + +# Amazon S3 data transfer configuration. +# Region can be any of the values found here: +# http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/regions/Regions.html +org.apache.oodt.cas.filemgr.datatransfer.s3.bucket.name=some_bucket_name +org.apache.oodt.cas.filemgr.datatransfer.s3.region=EU_WEST_1 +org.apache.oodt.cas.filemgr.datatransfer.s3.access.key=s3_access_key +org.apache.oodt.cas.filemgr.datatransfer.s3.secret.key=s3_secret_key + +# location of Mime-Type repository +org.apache.oodt.cas.filemgr.mime.type.repository=[OODT_FILEMGR_HOME]/target/filemgr/policy/mime-types.xml + +# tells the file manager system layer to include product instance metadata +# NOTE: here are the expected field mappings +# +# product.getProductId() -> ProductId +# product.getProductName() -> ProductName +# product.getProductStructure() -> ProductStructure +# product.getTransferStatus() -> ProductTransferStatus +# product.getRootRef() -> ProductRootReference + +# for the references returned by product.getProductReferences() the following +# metadata fields will be added (order will be maintained, such that data store +# ref at index 0 will map to orig ref at index 0, etc.) +# +# ProductDataStoreReferences (list of all data store references: +# note already translated into path, not URI) +# ProductOrigReferences (list of all orig references: +# note already translated into path, not URI) +# ProductMimeType (list of all references' mime-types) +# ProductFileSize (list of all references' file sizes) + +org.apache.oodt.cas.filemgr.metadata.expandProduct=true + +# ConfigurableMetadataBasedVersioning configuration +#org.apache.oodt.cas.filemgr.versioning.configuration.all_product_types=[Year]/[Month]/[Filename] +#org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename] + +# Enable to use only server-side versioning. +#org.apache.oodt.cas.filemgr.serverside.versioning=true \ No newline at end of file http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/filemgr.properties ---------------------------------------------------------------------- diff --git a/filemgr/src/test/resources/filemgr.properties b/filemgr/src/test/resources/filemgr.properties index d79896a..4c9b885 100644 --- a/filemgr/src/test/resources/filemgr.properties +++ b/filemgr/src/test/resources/filemgr.properties @@ -152,159 +152,4 @@ org.apache.oodt.cas.filemgr.metadata.expandProduct=false #org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename] # Enable to use only server-side versioning. -#org.apache.oodt.cas.filemgr.serverside.versioning=true -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Test Configuration properties for the File Manager - -# repository factory -filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory - -# catalog factory -filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory - -# data transfer factory -filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory - -# validation layer factory -filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory - -# xml rpc client configuration -org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20 -org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60 -#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0 -#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3 - -# data source catalog configuration -org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test -org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=sa -org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass= -org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver -org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false -org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20 -org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5 -org.apache.oodt.cas.filemgr.catalog.datasource.orderedValues=false -# set the following property to 'true' to allow dynamic metadata fields, -# effectively bypassing the validation layer. -# by default the property is false -#org.apache.oodt.cas.filemgr.catalog.datasource.lenientFields=true -# set the following property to true to enable the column "product_id" -# in table "products" to be of type string -#org.apache.oodt.cas.filemgr.catalog.datasource.productId.string=false - - -# mapped data source catalog configuration -org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties - -# science data catalog configuration -org.apache.oodt.cas.filemgr.catalog.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test -org.apache.oodt.cas.filemgr.catalog.science.jdbc.user=sa -org.apache.oodt.cas.filemgr.catalog.science.jdbc.pass= -org.apache.oodt.cas.filemgr.catalog.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver - -# lucene catalog configuration -org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=file:/testdata/ -org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20 -org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60 -org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60 -org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20 - -# solr catalog configuration -org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8983/solr -#org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8080/solr -org.apache.oodt.cas.filemgr.catalog.solr.productSerializer=org.apache.oodt.cas.filemgr.catalog.solr.DefaultProductSerializer -org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.UUIDProductIdGenerator -#org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.NameProductIdGenerator - - -# data source repository manager configuration -org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test -org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=sa -org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass= -org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver - -# science data repository manager configuration -org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test -org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.user=sa -org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.pass= -org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver - -# XML repository manager configuration -org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:///dir1,file:///dir2 - -# XML validation layer configuration -org.apache.oodt.cas.filemgr.validation.dirs=file:///dir1,file:///dir2 - -# set the following property to 'true' to allow dynamic metadata fields, -# effectively bypassing the validation layer. -# by default the property is false -#org.apache.oodt.cas.filemgr.catalog.lucene.lenientFields=true - -# data source validation layer configuration -org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test -org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=sa -org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass= -org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver -org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false - -# science data validation layer configuration -org.apache.oodt.cas.filemgr.validation.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test -org.apache.oodt.cas.filemgr.validation.science.jdbc.user=sa -org.apache.oodt.cas.filemgr.validation.science.jdbc.pass= -org.apache.oodt.cas.filemgr.validation.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver - -# remote data transfer configuration -org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024 - -# Amazon S3 data transfer configuration. -# Region can be any of the values found here: -# http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/regions/Regions.html -org.apache.oodt.cas.filemgr.datatransfer.s3.bucket.name=some_bucket_name -org.apache.oodt.cas.filemgr.datatransfer.s3.region=EU_WEST_1 -org.apache.oodt.cas.filemgr.datatransfer.s3.access.key=s3_access_key -org.apache.oodt.cas.filemgr.datatransfer.s3.secret.key=s3_secret_key - -# location of Mime-Type repository -org.apache.oodt.cas.filemgr.mime.type.repository=file:/src/mime-types.xml - -# tells the file manager system layer to include product instance metadata -# NOTE: here are the expected field mappings -# -# product.getProductId() -> ProductId -# product.getProductName() -> ProductName -# product.getProductStructure() -> ProductStructure -# product.getTransferStatus() -> ProductTransferStatus -# product.getRootRef() -> ProductRootReference - -# for the references returned by product.getProductReferences() the following -# metadata fields will be added (order will be maintained, such that data store -# ref at index 0 will map to orig ref at index 0, etc.) -# -# ProductDataStoreReferences (list of all data store references: -# note already translated into path, not URI) -# ProductOrigReferences (list of all orig references: -# note already translated into path, not URI) -# ProductMimeType (list of all references' mime-types) -# ProductFileSize (list of all references' file sizes) - -org.apache.oodt.cas.filemgr.metadata.expandProduct=false - -# ConfigurableMetadataBasedVersioning configuration -#org.apache.oodt.cas.filemgr.versioning.configuration.all_product_types=[Year]/[Month]/[Filename] -#org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename] - -# Enable to use only server-side versioning. #org.apache.oodt.cas.filemgr.serverside.versioning=true \ No newline at end of file
