You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ht...@apache.org on 2020/05/11 17:12:58 UTC

[asterixdb] branch master updated: [NO ISSUE][TEST] Remove Spidersilk Integration

This is an automated email from the ASF dual-hosted git repository.

htowaileb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 104d934  [NO ISSUE][TEST] Remove Spidersilk Integration
     new d13c600  Merge commit '104d934' from 'gerrit/mad-hatter'
104d934 is described below

commit 104d934f933f27b2346ce1421c577a4a5ea70fb6
Author: Murtadha Hubail <mh...@apache.org>
AuthorDate: Thu Apr 9 18:49:32 2020 +0300

    [NO ISSUE][TEST] Remove Spidersilk Integration
    
    - user model changes: no
    - storage format changes: no
    - interface changes: no
    
    Details:
    - Remove Spidersilk test framework since it has only a simple
      test and the framework isn't currently being utilized.
    
    Change-Id: I78eda6280fc20df1a91e17682785b2654473712d
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/5683
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Michael Blow <mb...@apache.org>
---
 .gitignore                                         |  2 -
 asterixdb/asterix-spidersilk/config/cc.conf        | 35 ---------
 asterixdb/asterix-spidersilk/docker/Dockerfile     | 22 ------
 asterixdb/asterix-spidersilk/pom.xml               | 87 ----------------------
 .../apache/asterix/spidersilk/SampleTestIT.java    | 87 ----------------------
 .../org/apache/asterix/spidersilk/TestUtil.java    | 74 ------------------
 .../src/test/resources/logback.xml                 | 35 ---------
 asterixdb/pom.xml                                  |  1 -
 8 files changed, 343 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1dcc3c2..295d874 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,5 +27,3 @@ dist
 *.swp
 .m2*
 ß
-
-.SpiderSilkWorkingDirectory
diff --git a/asterixdb/asterix-spidersilk/config/cc.conf b/asterixdb/asterix-spidersilk/config/cc.conf
deleted file mode 100644
index 3212003..0000000
--- a/asterixdb/asterix-spidersilk/config/cc.conf
+++ /dev/null
@@ -1,35 +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.
-
-[nc/nc1]
-txn.log.dir=/data/txnlog
-core.dump.dir=/data/coredump
-iodevices=/data
-address=nc1
-
-[nc/nc2]
-txn.log.dir=/data/txnlog
-core.dump.dir=/data/coredump
-iodevices=/data
-address=nc2
-
-[nc]
-app.class=org.apache.asterix.hyracks.bootstrap.NCApplicationEntryPoint
-command=asterixnc
-
-[cc]
-address=cc
\ No newline at end of file
diff --git a/asterixdb/asterix-spidersilk/docker/Dockerfile b/asterixdb/asterix-spidersilk/docker/Dockerfile
deleted file mode 100644
index b25561a..0000000
--- a/asterixdb/asterix-spidersilk/docker/Dockerfile
+++ /dev/null
@@ -1,22 +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.
-
-FROM centos:7
-
-USER root
-
-RUN yum install -y unzip git which docker-client java-1.8.0-openjdk-headless
diff --git a/asterixdb/asterix-spidersilk/pom.xml b/asterixdb/asterix-spidersilk/pom.xml
index 6b370c8..c58ee4f 100644
--- a/asterixdb/asterix-spidersilk/pom.xml
+++ b/asterixdb/asterix-spidersilk/pom.xml
@@ -35,91 +35,4 @@
       <comments>A business-friendly OSS license</comments>
     </license>
   </licenses>
-
-  <properties>
-    <root.dir>${basedir}/..</root.dir>
-  </properties>
-
-  <repositories>
-    <repository>
-      <id>snapshots-repo</id>
-      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
-      <releases><enabled>false</enabled></releases>
-      <snapshots><enabled>true</enabled></snapshots>
-    </repository>
-  </repositories>
-
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>me.arminb.spidersilk</groupId>
-      <artifactId>spidersilk</artifactId>
-      <version>0.4.0</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>1.7.25</version>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-      <version>2.9.7</version>
-    </dependency>
-    <dependency>
-      <groupId>ch.qos.logback</groupId>
-      <artifactId>logback-classic</artifactId>
-      <version>1.2.3</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-app</artifactId>
-      <version>${project.version}</version>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-test-framework</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-app</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-server</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-  </dependencies>
-
-  <!-- While these dependencies are declared and being used, the maven dependency plugin detects them as declared and
-  not used. To make this right, it is needed to force these dependencies as used -->
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <configuration>
-          <usedDependencies>
-            <usedDependency>ch.qos.logback:logback-classic</usedDependency>
-            <usedDependency>org.apache.asterix:asterix-app</usedDependency>
-            <usedDependency>org.apache.asterix:asterix-server</usedDependency>
-          </usedDependencies>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
diff --git a/asterixdb/asterix-spidersilk/src/test/java/org/apache/asterix/spidersilk/SampleTestIT.java b/asterixdb/asterix-spidersilk/src/test/java/org/apache/asterix/spidersilk/SampleTestIT.java
deleted file mode 100644
index b3b73bf..0000000
--- a/asterixdb/asterix-spidersilk/src/test/java/org/apache/asterix/spidersilk/SampleTestIT.java
+++ /dev/null
@@ -1,87 +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.asterix.spidersilk;
-
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.asterix.test.common.TestExecutor;
-import org.apache.asterix.testframework.context.TestCaseContext;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import me.arminb.spidersilk.SpiderSilkRunner;
-import me.arminb.spidersilk.dsl.entities.Deployment;
-import me.arminb.spidersilk.exceptions.RuntimeEngineException;
-
-public class SampleTestIT {
-    private static final Logger logger = LoggerFactory.getLogger(SampleTestIT.class);
-
-    protected static SpiderSilkRunner runner;
-
-    @BeforeClass
-    public static void before() throws RuntimeEngineException {
-        Deployment deployment = TestUtil.getSimpleClusterDeployment();
-        runner = SpiderSilkRunner.run(deployment);
-        TestUtil.waitForClusterToBeUp(runner);
-        logger.info("The cluster is UP!");
-    }
-
-    @AfterClass
-    public static void after() {
-        if (runner != null) {
-            runner.stop();
-        }
-    }
-
-    @Test
-    public void sampleTest() throws Exception {
-
-        TestExecutor testExecutor = TestUtil.getTestExecutor(runner);
-        String ddl = "drop dataverse company if exists;" + "create dataverse company;" + "use company;"
-                + "create type Emp as open {" + "  id : int32," + "  name : string" + "};"
-                + "create dataset Employee(Emp) primary key id;";
-
-        String insertStatements = "use company;" + "insert into Employee({ \"id\":123,\"name\":\"John Doe\"});";
-
-        String query = "use company;" + "select value emp from Employee emp;";
-
-        testExecutor.executeSqlppUpdateOrDdl(ddl, TestCaseContext.OutputFormat.CLEAN_JSON);
-        logger.info("Company dataverse and employee dataset are created!");
-        testExecutor.executeSqlppUpdateOrDdl(insertStatements, TestCaseContext.OutputFormat.CLEAN_JSON);
-        logger.info("A record is inserted into employee dataset");
-        InputStream resultStream = testExecutor.executeSqlppUpdateOrDdl(query, TestCaseContext.OutputFormat.CLEAN_JSON);
-
-        ObjectMapper objectMapper = new ObjectMapper();
-        List<Map<String, String>> result = objectMapper.readValue(resultStream, List.class);
-
-        Assert.assertEquals(1, result.size());
-        Assert.assertEquals(123, result.get(0).get("id"));
-        Assert.assertEquals("John Doe", result.get(0).get("name"));
-
-        logger.info("The fetched record matches the inserted record");
-    }
-}
diff --git a/asterixdb/asterix-spidersilk/src/test/java/org/apache/asterix/spidersilk/TestUtil.java b/asterixdb/asterix-spidersilk/src/test/java/org/apache/asterix/spidersilk/TestUtil.java
deleted file mode 100644
index 03e8191..0000000
--- a/asterixdb/asterix-spidersilk/src/test/java/org/apache/asterix/spidersilk/TestUtil.java
+++ /dev/null
@@ -1,74 +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.asterix.spidersilk;
-
-import java.io.File;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.stream.Stream;
-
-import org.apache.asterix.test.common.TestExecutor;
-
-import me.arminb.spidersilk.SpiderSilkRunner;
-import me.arminb.spidersilk.dsl.entities.Deployment;
-import me.arminb.spidersilk.dsl.entities.PortType;
-import me.arminb.spidersilk.dsl.entities.ServiceType;
-import me.arminb.spidersilk.exceptions.RuntimeEngineException;
-
-public class TestUtil {
-    private static String mavenVersion;
-    private static String asterixHome;
-
-    public static Deployment getSimpleClusterDeployment() {
-        mavenVersion = getMavenArtifactVersion();
-        asterixHome = "/asterix/apache-asterixdb-" + mavenVersion;
-
-        return new Deployment.DeploymentBuilder("simpleClusterDeployment")
-                // Service Definitions
-                .withService("asterix")
-                .applicationPath("../asterix-server/target/asterix-server-" + mavenVersion + "-binary-assembly.zip",
-                        "/asterix", false, true, false)
-                .dockerFileAddress("docker/Dockerfile", false).dockerImage("spidersilk/test-asterix")
-                .instrumentablePath(asterixHome + "/repo/asterix-server-" + mavenVersion + ".jar")
-                .libraryPath(asterixHome + "/repo/*.jar").libraryPath(asterixHome + "/lib/*.jar")
-                .logDirectory(asterixHome + "/logs").serviceType(ServiceType.JAVA).and()
-                // Node Definitions
-                .withNode("cc", "asterix").applicationPath("config", "/asterix/config")
-                .startCommand(asterixHome + "/bin/asterixcc -config-file /asterix/config/cc.conf").tcpPort(19002).and()
-                .withNode("nc1", "asterix").startCommand(asterixHome + "/bin/asterixncservice").and()
-                .withNode("nc2", "asterix").startCommand(asterixHome + "/bin/asterixncservice").and().build();
-    }
-
-    public static String getMavenArtifactVersion() {
-        Optional<String> version = Stream
-                .of(Objects.requireNonNull(new File("../asterix-server/target")
-                        .list((dir, name) -> name.matches("asterix-server-.*-binary-assembly.zip"))))
-                .map(foo -> foo.replace("asterix-server-", "")).map(foo -> foo.replace("-binary-assembly.zip", ""))
-                .findFirst();
-        return version.orElseThrow(IllegalStateException::new);
-    }
-
-    public static void waitForClusterToBeUp(SpiderSilkRunner runner) throws RuntimeEngineException {
-        runner.runtime().runCommandInNode("cc", asterixHome + "/bin/asterixhelper wait_for_cluster");
-    }
-
-    public static TestExecutor getTestExecutor(SpiderSilkRunner runner) {
-        return new TestExecutor(runner.runtime().ip("cc"), runner.runtime().portMapping("cc", 19002, PortType.TCP));
-    }
-}
diff --git a/asterixdb/asterix-spidersilk/src/test/resources/logback.xml b/asterixdb/asterix-spidersilk/src/test/resources/logback.xml
deleted file mode 100644
index ca7aa79..0000000
--- a/asterixdb/asterix-spidersilk/src/test/resources/logback.xml
+++ /dev/null
@@ -1,35 +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.
-  -->
-
-<configuration>
-
-    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
-        <layout class="ch.qos.logback.classic.PatternLayout">
-            <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
-        </layout>
-    </appender>
-
-    <logger name="me.arminb" level="DEBUG"/>
-    <logger name="org.apache.asterix" level="DEBUG"/>
-
-    <root level="ERROR">
-        <appender-ref ref="Console" />
-    </root>
-</configuration>
diff --git a/asterixdb/pom.xml b/asterixdb/pom.xml
index 76ec3d2..96a1998 100644
--- a/asterixdb/pom.xml
+++ b/asterixdb/pom.xml
@@ -195,7 +195,6 @@
             <exclude>**/*.json</exclude>
             <exclude>**/*.adm</exclude>
             <exclude>**/*.template</exclude>
-            <exclude>**/.SpiderSilkWorkingDirectory/**</exclude>
             <exclude>asterix-installer/**</exclude> <!-- in case -DskipInstaller -->
           </excludes>
         </configuration>