You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:47:40 UTC

[04/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerEc2LiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerEc2LiveTest.java
deleted file mode 100644
index 2ac3c57..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerEc2LiveTest.java
+++ /dev/null
@@ -1,65 +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.brooklyn.entity.nosql.solr;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.AbstractEc2LiveTest;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.solr.common.SolrDocument;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-public class SolrServerEc2LiveTest extends AbstractEc2LiveTest {
-
-    private static final Logger log = LoggerFactory.getLogger(SolrServerEc2LiveTest.class);
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        log.info("Testing Solr on {}", loc);
-
-        SolrServer solr = app.createAndManageChild(EntitySpec.create(SolrServer.class)
-                .configure(SolrServer.SOLR_CORE_CONFIG, ImmutableMap.of("example", "classpath://solr/example.tgz")));
-        app.start(ImmutableList.of(loc));
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, true);
-
-        SolrJSupport client = new SolrJSupport(solr, "example");
-
-        Iterable<SolrDocument> results = client.getDocuments();
-        assertTrue(Iterables.isEmpty(results));
-
-        client.addDocument(MutableMap.<String, Object>of("id", "1", "description", "first"));
-        client.addDocument(MutableMap.<String, Object>of("id", "2", "description", "second"));
-        client.addDocument(MutableMap.<String, Object>of("id", "3", "description", "third"));
-        client.commit();
-
-        results = client.getDocuments();
-        assertEquals(Iterables.size(results), 3);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerIntegrationTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerIntegrationTest.java
deleted file mode 100644
index 67b69ce..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerIntegrationTest.java
+++ /dev/null
@@ -1,84 +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.brooklyn.entity.nosql.solr;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.nosql.solr.SolrServer;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.solr.common.SolrDocument;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-/**
- * Solr integration tests.
- *
- * Test the operation of the {@link SolrServer} class.
- */
-public class SolrServerIntegrationTest extends AbstractSolrServerTest {
-
-    /**
-     * Test that a node starts and sets SERVICE_UP correctly.
-     */
-    @Test(groups = "Integration")
-    public void canStartupAndShutdown() {
-        solr = app.createAndManageChild(EntitySpec.create(SolrServer.class));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, true);
-        Entities.dumpInfo(app);
-
-        solr.stop();
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, false);
-    }
-
-    /**
-     * Test that a core can be created and used with SolrJ client.
-     */
-    @Test(groups = "Integration")
-    public void testConnection() throws Exception {
-        solr = app.createAndManageChild(EntitySpec.create(SolrServer.class)
-                .configure(SolrServer.SOLR_CORE_CONFIG, ImmutableMap.of("example", "classpath://solr/example.tgz")));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, true);
-
-        SolrJSupport client = new SolrJSupport(solr, "example");
-
-        Iterable<SolrDocument> results = client.getDocuments();
-        assertTrue(Iterables.isEmpty(results));
-
-        client.addDocument(MutableMap.<String, Object>of("id", "1", "description", "first"));
-        client.addDocument(MutableMap.<String, Object>of("id", "2", "description", "second"));
-        client.addDocument(MutableMap.<String, Object>of("id", "3", "description", "third"));
-        client.commit();
-
-        results = client.getDocuments();
-        assertEquals(Iterables.size(results), 3);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerLiveTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerLiveTest.java b/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerLiveTest.java
deleted file mode 100644
index 1352d1a..0000000
--- a/brooklyn-library/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/solr/SolrServerLiveTest.java
+++ /dev/null
@@ -1,89 +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.brooklyn.entity.nosql.solr;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Map;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.entity.nosql.solr.SolrServer;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.solr.common.SolrDocument;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-/**
- * Solr live tests.
- *
- * Test the operation of the {@link SolrServer} class using the jclouds {@code rackspace-cloudservers-uk}
- * and {@code aws-ec2} providers, with different OS images. The tests use the {@link SolrJSupport} class
- * to exercise the node, and will need to have {@code brooklyn.jclouds.provider.identity} and {@code .credential}
- * set, usually in the {@code .brooklyn/brooklyn.properties} file.
- */
-public class SolrServerLiveTest extends AbstractSolrServerTest {
-
-    private static final Logger log = LoggerFactory.getLogger(SolrServerLiveTest.class);
-
-    @DataProvider(name = "virtualMachineData")
-    public Object[][] provideVirtualMachineData() {
-        return new Object[][] { // ImageId, Provider, Region, Description (for logging)
-            new Object[] { "eu-west-1/ami-0307d674", "aws-ec2", "eu-west-1", "Ubuntu Server 14.04 LTS (HVM), SSD Volume Type" },
-            new Object[] { "LON/f9b690bf-88eb-43c2-99cf-391f2558732e", "rackspace-cloudservers-uk", "", "Ubuntu 12.04 LTS (Precise Pangolin)" }, 
-            new Object[] { "LON/a84b1592-6817-42da-a57c-3c13f3cfc1da", "rackspace-cloudservers-uk", "", "CentOS 6.5 (PVHVM)" }, 
-        };
-    }
-
-    @Test(groups = "Live", dataProvider = "virtualMachineData")
-    protected void testOperatingSystemProvider(String imageId, String provider, String region, String description) throws Exception {
-        log.info("Testing Solr on {}{} using {} ({})", new Object[] { provider, Strings.isNonEmpty(region) ? ":" + region : "", description, imageId });
-
-        Map<String, String> properties = MutableMap.of("imageId", imageId);
-        testLocation = app.getManagementContext().getLocationRegistry()
-                .resolve(provider + (Strings.isNonEmpty(region) ? ":" + region : ""), properties);
-        solr = app.createAndManageChild(EntitySpec.create(SolrServer.class)
-                .configure(SolrServer.SOLR_CORE_CONFIG, ImmutableMap.of("example", "classpath://solr/example.tgz")));
-        app.start(ImmutableList.of(testLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(solr, Startable.SERVICE_UP, true);
-
-        SolrJSupport client = new SolrJSupport(solr, "example");
-
-        Iterable<SolrDocument> results = client.getDocuments();
-        assertTrue(Iterables.isEmpty(results));
-
-        client.addDocument(MutableMap.<String, Object>of("id", "1", "description", "first"));
-        client.addDocument(MutableMap.<String, Object>of("id", "2", "description", "second"));
-        client.addDocument(MutableMap.<String, Object>of("id", "3", "description", "third"));
-        client.commit();
-
-        results = client.getDocuments();
-        assertEquals(Iterables.size(results), 3);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/mongodb-keyfile
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/mongodb-keyfile b/brooklyn-library/software/nosql/src/test/resources/mongodb-keyfile
deleted file mode 100644
index 6d4640a..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/mongodb-keyfile
+++ /dev/null
@@ -1,16 +0,0 @@
-df1DzycxICi2RFa1xsDP5uiVcVtZ4EQBxffQ+FDuD4n81iOGW7pNOS49aH4t9PW6
-s0t+mASRnY/IVOsiTNT5VQWeMhf6b0/aYuXJp9ZZNQ9PmyA60a8x5x9K3YIoGYAd
-/RGenkIOIG9EjXnqTT1QgN66xVIUp8v2w0iuER0jiG+GcjBVVWGgqKcj6ZLQRecC
-6xSETYuJRbXdPanpnlk8oRYrtWFgcmQ8pl0/0hc/8i82PjTC8DdkqRqYQzhAvexh
-Fo8ZOPiS8xmiDWDsKBJscf6J5KKlgr/3ws0Kv5Qqxmq7oelAmZ+xRvyFBYbao3cz
-3XKBC9SBYfexnl25S9Ef94IV6bqls6SwQMTNS5W0sn3L/Mi55yEWFN44pcYCJ4ng
-oHMDaQyOC+Fi0rRcRduFZWYHlw7ibX0AaRQhwhh0YEbgFY2O7QoTNxwNycxLeKLr
-VMY8ZcTRzvmypAfetWHlwx97G+yXebCsZZ+TbAR/txficwmLFw/M5Qit8Op7YVFM
-zsrKnJZq/Ar8kLzw2UrIFfecaRl3hqT4CI8htaVW+fbc94RHNiZpHg5k/I+aNT45
-9uxRNNPcZiDln7ZV3skhVwQ0UeUZUBp0UZj33N2f/5JXxoRc5slb2mMFEKe+FH6a
-0M86QphH356jrIBSalm7duLAFzB8oyf7+JQgbpwooiO5D+KqIJevpwZXtjuaKVCU
-4bOJNq8AaJU6yjPNihHiGuGLv3/TmXP1Q8Cr4XSyzpv9pxZvvb0XYdlxWIQg0szv
-5QSTkgx6CCBoeDbVoWJh4bE3lobFponKC9o5j3nVAqPbxZocq6Lr6TWrXfwlNRcg
-Cvenxs8mjRQV7Hg7956P/dJtavN3UpSTwbius5h/oIf9ywBmVLNAIhbOS3kcacOC
-YlnJZGN+m1Wo9AvsmLz+yl5GB3W/zA4vUyhWnUY24BoKKEFYef594wi2sagz9TVC
-nLrWCE8djB9j4tudcz6PdFFhQHmB

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/solr/example.tgz
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/solr/example.tgz b/brooklyn-library/software/nosql/src/test/resources/solr/example.tgz
deleted file mode 100644
index 6236fc0..0000000
Binary files a/brooklyn-library/software/nosql/src/test/resources/solr/example.tgz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/solr/example.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/solr/example.txt b/brooklyn-library/software/nosql/src/test/resources/solr/example.txt
deleted file mode 100644
index 4e15549..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/solr/example.txt
+++ /dev/null
@@ -1,18 +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.
-
-The example tarball in this directory consists simply of the source files in this directory. It is included as a (tiny) binary to prevent build complication when aggregating them for upload to remote servers.

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/schema.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/schema.xml b/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/schema.xml
deleted file mode 100644
index 467b4aa..0000000
--- a/brooklyn-library/software/nosql/src/test/resources/solr/example/conf/schema.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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.
--->
-<schema name="example" version="1.5">
-    <fields>
-        <field name="_version_" type="long" indexed="true" stored="true" />
-        <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
-        <field name="description" type="text_general" indexed="true" stored="true" />
-        <field name="comments" type="text_general" indexed="true" stored="true" />
-        <field name="author" type="text_general" indexed="true" stored="true" />
-        <field name="keywords" type="text_general" indexed="true" stored="true" />
-        <field name="category" type="text_general" indexed="true" stored="true" />
-        <field name="content" type="text_general" indexed="false" stored="true" multiValued="true" />
-        <field name="text" type="text_general" indexed="true" stored="false" multiValued="true" />
-    </fields>
-
-    <uniqueKey>id</uniqueKey>
-
-    <types>
-        <fieldType name="long" class="solr.TrieLongField" />
-        <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
-        <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
-            <analyzer type="index">
-                <tokenizer class="solr.StandardTokenizerFactory" />
-                <filter class="solr.LowerCaseFilterFactory" />
-            </analyzer>
-            <analyzer type="query">
-                <tokenizer class="solr.StandardTokenizerFactory" />
-                <filter class="solr.LowerCaseFilterFactory" />
-            </analyzer>
-        </fieldType>
-    </types>
-</schema>
-