You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2018/02/11 21:05:05 UTC
[2/2] asterixdb git commit: [NO ISSUE] Remove Pregelix
[NO ISSUE] Remove Pregelix
Change-Id: I7d5f789ee6c3ca3ffa41edcc36fa7f494b04924b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2381
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mh...@apache.org>
Integration-Tests: Murtadha Hubail <mh...@apache.org>
Tested-by: Murtadha Hubail <mh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/64d49fb6
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/64d49fb6
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/64d49fb6
Branch: refs/heads/master
Commit: 64d49fb6bedf3d00f64d8ba1ca6af99473197d40
Parents: d41ce54
Author: Michael Blow <mb...@apache.org>
Authored: Sun Feb 11 15:43:47 2018 -0500
Committer: Michael Blow <mb...@apache.org>
Committed: Sun Feb 11 13:03:55 2018 -0800
----------------------------------------------------------------------
.../asterix/app/translator/QueryTranslator.java | 275 -------------------
.../aql/translator/QueryTranslatorTest.java | 117 --------
.../graph/pregel-q01/pregel-q01.1.ddl.aql | 65 -----
.../graph/pregel-q01/pregel-q01.2.update.aql | 52 ----
.../graph/pregel-q01/pregel-q01.3.query.aql | 27 --
.../graph/pregel-q02/pregel-q02.1.ddl.aql | 34 ---
.../graph/pregel-q02/pregel-q02.2.update.aql | 45 ---
.../graph/pregel-q02/pregel-q02.3.query.aql | 27 --
.../graph/pregel-q03/pregel-q03.1.ddl.aql | 34 ---
.../graph/pregel-q03/pregel-q03.2.update.aql | 34 ---
.../graph/pregel-q03/pregel-q03.3.query.aql | 27 --
.../graph/pregel-q01/pregel-q01.1.ddl.sqlpp | 68 -----
.../graph/pregel-q01/pregel-q01.2.update.sqlpp | 31 ---
.../graph/pregel-q01/pregel-q01.3.query.sqlpp | 25 --
.../graph/pregel-q02/pregel-q02.1.ddl.sqlpp | 42 ---
.../graph/pregel-q02/pregel-q02.2.update.sqlpp | 24 --
.../graph/pregel-q02/pregel-q02.3.query.sqlpp | 25 --
.../graph/pregel-q03/pregel-q03.1.ddl.sqlpp | 42 ---
.../graph/pregel-q03/pregel-q03.2.update.sqlpp | 24 --
.../graph/pregel-q03/pregel-q03.3.query.sqlpp | 25 --
.../results/graph/pregel-q01/pregel-q01.1.adm | 12 -
.../results/graph/pregel-q02/pregel-q02.1.adm | 20 --
.../results/graph/pregel-q03/pregel-q03.1.adm | 10 -
.../src/test/resources/runtimets/testsuite.xml | 17 --
.../resources/runtimets/testsuite_sqlpp.xml | 15 -
.../runtimets/testsuite_sqlpp_parser.xml | 15 -
.../common/config/CompilerProperties.java | 12 +-
.../asterix-lang-aql/src/main/javacc/AQL.jj | 23 --
.../asterix/lang/common/base/Statement.java | 31 +--
.../lang/common/statement/RunStatement.java | 86 ------
.../asterix-lang-sqlpp/src/main/javacc/SQLPP.jj | 23 --
asterixdb/asterix-server/pom.xml | 16 ++
.../integrationts/asterix-configuration.xml | 261 ------------------
asterixdb/pom.xml | 7 +
hyracks-fullstack/pom.xml | 16 +-
35 files changed, 38 insertions(+), 1569 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
index 335899c..51adb76 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
@@ -18,12 +18,9 @@
*/
package org.apache.asterix.app.translator;
-import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
-import java.io.IOException;
import java.io.InputStream;
-import java.io.InputStreamReader;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Collection;
@@ -36,7 +33,6 @@ import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Objects;
import java.util.Properties;
import java.util.Set;
@@ -62,7 +58,6 @@ import org.apache.asterix.common.config.DatasetConfig.DatasetType;
import org.apache.asterix.common.config.DatasetConfig.ExternalFilePendingOp;
import org.apache.asterix.common.config.DatasetConfig.IndexType;
import org.apache.asterix.common.config.DatasetConfig.TransactionState;
-import org.apache.asterix.common.config.ExternalProperties;
import org.apache.asterix.common.config.GlobalConfig;
import org.apache.asterix.common.dataflow.ICcApplicationContext;
import org.apache.asterix.common.exceptions.ACIDException;
@@ -84,11 +79,7 @@ import org.apache.asterix.lang.common.base.IReturningStatement;
import org.apache.asterix.lang.common.base.IRewriterFactory;
import org.apache.asterix.lang.common.base.IStatementRewriter;
import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.lang.common.expression.FieldBinding;
import org.apache.asterix.lang.common.expression.IndexedTypeExpression;
-import org.apache.asterix.lang.common.expression.LiteralExpr;
-import org.apache.asterix.lang.common.expression.RecordConstructor;
-import org.apache.asterix.lang.common.literal.StringLiteral;
import org.apache.asterix.lang.common.statement.CompactStatement;
import org.apache.asterix.lang.common.statement.ConnectFeedStatement;
import org.apache.asterix.lang.common.statement.CreateDataverseStatement;
@@ -107,7 +98,6 @@ import org.apache.asterix.lang.common.statement.FeedDropStatement;
import org.apache.asterix.lang.common.statement.FeedPolicyDropStatement;
import org.apache.asterix.lang.common.statement.FunctionDecl;
import org.apache.asterix.lang.common.statement.FunctionDropStatement;
-import org.apache.asterix.lang.common.statement.IDatasetDetailsDecl;
import org.apache.asterix.lang.common.statement.IndexDropStatement;
import org.apache.asterix.lang.common.statement.InsertStatement;
import org.apache.asterix.lang.common.statement.InternalDetailsDecl;
@@ -116,7 +106,6 @@ import org.apache.asterix.lang.common.statement.NodeGroupDropStatement;
import org.apache.asterix.lang.common.statement.NodegroupDecl;
import org.apache.asterix.lang.common.statement.Query;
import org.apache.asterix.lang.common.statement.RefreshExternalDatasetStatement;
-import org.apache.asterix.lang.common.statement.RunStatement;
import org.apache.asterix.lang.common.statement.SetStatement;
import org.apache.asterix.lang.common.statement.StartFeedStatement;
import org.apache.asterix.lang.common.statement.StopFeedStatement;
@@ -126,7 +115,6 @@ import org.apache.asterix.lang.common.statement.WriteStatement;
import org.apache.asterix.lang.common.struct.Identifier;
import org.apache.asterix.lang.common.struct.VarIdentifier;
import org.apache.asterix.lang.common.util.FunctionUtil;
-import org.apache.asterix.lang.common.util.MergePolicyUtils;
import org.apache.asterix.lang.sqlpp.rewrites.SqlppRewriterFactory;
import org.apache.asterix.metadata.IDatasetDetails;
import org.apache.asterix.metadata.MetadataManager;
@@ -404,9 +392,6 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen
writerFactory = (result.first != null) ? result.first : writerFactory;
outputFile = result.second;
break;
- case Statement.Kind.RUN:
- handleRunStatement(metadataProvider, stmt, hcc);
- break;
case Statement.Kind.FUNCTION_DECL:
// No op
break;
@@ -2789,266 +2774,6 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen
}
}
- protected void handleRunStatement(MetadataProvider metadataProvider, Statement stmt, IHyracksClientConnection hcc)
- throws CompilationException, Exception {
- RunStatement runStmt = (RunStatement) stmt;
- switch (runStmt.getSystem()) {
- case "pregel":
- case "pregelix":
- handlePregelixStatement(metadataProvider, runStmt, hcc);
- break;
- default:
- throw new AlgebricksException(
- "The system \"" + runStmt.getSystem() + "\" specified in your run statement is not supported.");
- }
-
- }
-
- protected void handlePregelixStatement(MetadataProvider metadataProvider, Statement stmt,
- IHyracksClientConnection hcc) throws Exception {
- RunStatement pregelixStmt = (RunStatement) stmt;
- boolean bActiveTxn = true;
- String dataverseNameFrom = getActiveDataverse(pregelixStmt.getDataverseNameFrom());
- String dataverseNameTo = getActiveDataverse(pregelixStmt.getDataverseNameTo());
- String datasetNameFrom = pregelixStmt.getDatasetNameFrom().getValue();
- String datasetNameTo = pregelixStmt.getDatasetNameTo().getValue();
- String fullyQualifiedDatasetNameTo =
- DatasetUtil.isFullyQualifiedName(datasetNameTo) ? datasetNameTo : dataverseNameTo + '.' + datasetNameTo;
- MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
- metadataProvider.setMetadataTxnContext(mdTxnCtx);
- MetadataLockUtil.insertDeleteUpsertBegin(lockManager, metadataProvider.getLocks(), fullyQualifiedDatasetNameTo);
- try {
- prepareRunExternalRuntime(metadataProvider, hcc, pregelixStmt, dataverseNameFrom, dataverseNameTo,
- datasetNameFrom, datasetNameTo, mdTxnCtx);
-
- String pregelixHomeKey = "PREGELIX_HOME";
- // Finds PREGELIX_HOME in system environment variables.
- String pregelixHome = System.getenv(pregelixHomeKey);
- // Finds PREGELIX_HOME in Java properties.
- if (pregelixHome == null) {
- pregelixHome = System.getProperty(pregelixHomeKey);
- }
- // Finds PREGELIX_HOME in AsterixDB configuration.
- if (pregelixHome == null) {
- // Since there is a default value for PREGELIX_HOME in CompilerProperties,
- // pregelixHome can never be null.
- pregelixHome = appCtx.getCompilerProperties().getPregelixHome();
- }
-
- // Constructs the pregelix command line.
- List<String> cmd = constructPregelixCommand(pregelixStmt, dataverseNameFrom, datasetNameFrom,
- dataverseNameTo, datasetNameTo);
- ProcessBuilder pb = new ProcessBuilder(cmd);
- pb.directory(new File(pregelixHome));
- pb.redirectErrorStream(true);
-
- MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
- bActiveTxn = false;
- // Executes the Pregelix command.
- int resultState = executeExternalShellProgram(pb);
- // Checks the return state of the external Pregelix command.
- if (resultState != 0) {
- throw new AlgebricksException(
- "Something went wrong executing your Pregelix Job. Perhaps the Pregelix cluster "
- + "needs to be restarted. "
- + "Check the following things: Are the datatypes of Asterix and Pregelix matching? "
- + "Is the server configuration correct (node names, buffer sizes, framesize)? "
- + "Check the logfiles for more details.");
- }
- } catch (Exception e) {
- if (bActiveTxn) {
- abort(e, e, mdTxnCtx);
- }
- throw e;
- } finally {
- metadataProvider.getLocks().unlock();
- }
- }
-
- // Prepares to run a program on external runtime.
- protected void prepareRunExternalRuntime(MetadataProvider metadataProvider, IHyracksClientConnection hcc,
- RunStatement pregelixStmt, String dataverseNameFrom, String dataverseNameTo, String datasetNameFrom,
- String datasetNameTo, MetadataTransactionContext mdTxnCtx) throws Exception {
- // Validates the source/sink dataverses and datasets.
- Dataset fromDataset = metadataProvider.findDataset(dataverseNameFrom, datasetNameFrom);
- if (fromDataset == null) {
- throw new CompilationException("The source dataset " + datasetNameFrom + " in dataverse "
- + dataverseNameFrom + " could not be found for the Run command");
- }
- Dataset toDataset = metadataProvider.findDataset(dataverseNameTo, datasetNameTo);
- if (toDataset == null) {
- throw new CompilationException("The sink dataset " + datasetNameTo + " in dataverse " + dataverseNameTo
- + " could not be found for the Run command");
- }
-
- try {
- // Find the primary index of the sink dataset.
- Index toIndex = null;
- List<Index> indexes = MetadataManager.INSTANCE.getDatasetIndexes(mdTxnCtx, dataverseNameTo,
- pregelixStmt.getDatasetNameTo().getValue());
- for (Index index : indexes) {
- if (index.isPrimaryIndex()) {
- toIndex = index;
- break;
- }
- }
- if (toIndex == null) {
- throw new AlgebricksException("Tried to access non-existing dataset: " + datasetNameTo);
- }
- // Cleans up the sink dataset -- Drop and then Create.
- DropDatasetStatement dropStmt =
- new DropDatasetStatement(new Identifier(dataverseNameTo), pregelixStmt.getDatasetNameTo(), true);
- this.handleDatasetDropStatement(metadataProvider, dropStmt, hcc, null);
- IDatasetDetailsDecl idd = new InternalDetailsDecl(toIndex.getKeyFieldNames(),
- toIndex.getKeyFieldSourceIndicators(), false, null);
- RecordConstructor withRecord = getWithRecord(toDataset);
- DatasetDecl createToDataset = new DatasetDecl(new Identifier(dataverseNameTo),
- pregelixStmt.getDatasetNameTo(), new Identifier(toDataset.getItemTypeDataverseName()),
- new Identifier(toDataset.getItemTypeName()),
- new Identifier(toDataset.getMetaItemTypeDataverseName()),
- new Identifier(toDataset.getMetaItemTypeName()), new Identifier(toDataset.getNodeGroupName()),
- toDataset.getHints(), toDataset.getDatasetType(), idd, withRecord, false);
- this.handleCreateDatasetStatement(metadataProvider, createToDataset, hcc, null);
- } catch (Exception e) {
- LOGGER.log(Level.WARN, e.getMessage(), e);
- throw new AlgebricksException("Error cleaning the result dataset. This should not happen.");
- }
-
- // Flushes source dataset.
- FlushDatasetUtil.flushDataset(hcc, metadataProvider, dataverseNameFrom, datasetNameFrom);
- }
-
- private static RecordConstructor getWithRecord(Dataset dataset) {
- String mergePolicy = dataset.getCompactionPolicy();
- Map<String, String> mergePolicyProperties = dataset.getCompactionPolicyProperties();
- if (mergePolicy.equals(GlobalConfig.DEFAULT_COMPACTION_POLICY_NAME)
- && mergePolicyProperties.equals(GlobalConfig.DEFAULT_COMPACTION_POLICY_PROPERTIES)) {
- return null;
- }
- List<FieldBinding> mergePolicyRecordFields = new ArrayList<>(mergePolicyProperties == null ? 1 : 2);
- mergePolicyRecordFields.add(toFieldBinding(MergePolicyUtils.MERGE_POLICY_NAME_PARAMETER_NAME, mergePolicy));
- if (mergePolicyProperties != null) {
- mergePolicyRecordFields.add(
- toFieldBinding(MergePolicyUtils.MERGE_POLICY_PARAMETERS_PARAMETER_NAME, mergePolicyProperties));
- }
- FieldBinding mergePolicyBinding = toFieldBinding(MergePolicyUtils.MERGE_POLICY_PARAMETER_NAME,
- new RecordConstructor(mergePolicyRecordFields));
- List<FieldBinding> withRecordFields = new ArrayList<>(1);
- withRecordFields.add(mergePolicyBinding);
- return new RecordConstructor(withRecordFields);
- }
-
- private static FieldBinding toFieldBinding(String key, Map<String, String> value) {
- List<FieldBinding> fields = new ArrayList<>(value.size());
- for (Entry<String, String> entry : value.entrySet()) {
- fields.add(toFieldBinding(entry.getKey(), entry.getValue()));
- }
- RecordConstructor record = new RecordConstructor(fields);
- return toFieldBinding(key, record);
- }
-
- private static FieldBinding toFieldBinding(String key, RecordConstructor value) {
- return new FieldBinding(new LiteralExpr(new StringLiteral(key)), value);
- }
-
- private static FieldBinding toFieldBinding(String key, String value) {
- return new FieldBinding(new LiteralExpr(new StringLiteral(key)), new LiteralExpr(new StringLiteral(value)));
- }
-
- // Executes external shell commands.
- protected int executeExternalShellProgram(ProcessBuilder pb)
- throws IOException, AlgebricksException, InterruptedException {
- Process process = pb.start();
- try (BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()))) {
- String line;
- while ((line = in.readLine()) != null) {
- LOGGER.info(line);
- if (line.contains("Exception") || line.contains("Error")) {
- LOGGER.error(line);
- if (line.contains("Connection refused")) {
- throw new AlgebricksException(
- "The connection to your Pregelix cluster was refused. Is it running? "
- + "Is the port in the query correct?");
- }
- if (line.contains("Could not find or load main class")) {
- throw new AlgebricksException("The main class of your Pregelix query was not found. "
- + "Is the path to your .jar file correct?");
- }
- if (line.contains("ClassNotFoundException")) {
- throw new AlgebricksException("The vertex class of your Pregelix query was not found. "
- + "Does it exist? Is the spelling correct?");
- }
- }
- }
- process.waitFor();
- }
- // Gets the exit value of the program.
- return process.exitValue();
- }
-
- // Constructs a Pregelix command line.
- protected List<String> constructPregelixCommand(RunStatement pregelixStmt, String fromDataverseName,
- String fromDatasetName, String toDataverseName, String toDatasetName) {
- // Constructs AsterixDB parameters, e.g., URL, source dataset and sink dataset.
- ExternalProperties externalProperties = appCtx.getExternalProperties();
- String clientIP = appCtx.getServiceContext().getCCContext().getClusterControllerInfo().getClientNetAddress();
- StringBuilder asterixdbParameterBuilder = new StringBuilder();
- asterixdbParameterBuilder.append(
- "pregelix.asterixdb.url=" + "http://" + clientIP + ":" + externalProperties.getAPIServerPort() + ",");
- asterixdbParameterBuilder.append("pregelix.asterixdb.source=true,");
- asterixdbParameterBuilder.append("pregelix.asterixdb.sink=true,");
- asterixdbParameterBuilder.append("pregelix.asterixdb.input.dataverse=" + fromDataverseName + ",");
- asterixdbParameterBuilder.append("pregelix.asterixdb.input.dataset=" + fromDatasetName + ",");
- asterixdbParameterBuilder.append("pregelix.asterixdb.output.dataverse=" + toDataverseName + ",");
- asterixdbParameterBuilder.append("pregelix.asterixdb.output.dataset=" + toDatasetName + ",");
- asterixdbParameterBuilder.append("pregelix.asterixdb.output.cleanup=false,");
-
- // construct command
- List<String> cmds = new ArrayList<>();
- cmds.add("bin/pregelix");
- cmds.add(pregelixStmt.getParameters().get(0)); // jar
- cmds.add(pregelixStmt.getParameters().get(1)); // class
-
- String customizedPregelixProperty = "-cust-prop";
- String inputConverterClassKey = "pregelix.asterixdb.input.converterclass";
- String inputConverterClassValue = "=org.apache.pregelix.example.converter.VLongIdInputVertexConverter,";
- String outputConverterClassKey = "pregelix.asterixdb.output.converterclass";
- String outputConverterClassValue = "=org.apache.pregelix.example.converter.VLongIdOutputVertexConverter,";
- boolean custPropAdded = false;
- boolean meetCustProp = false;
- // User parameters.
- for (String s : pregelixStmt.getParameters().get(2).split(" ")) {
- if (meetCustProp) {
- if (!s.contains(inputConverterClassKey)) {
- asterixdbParameterBuilder.append(inputConverterClassKey + inputConverterClassValue);
- }
- if (!s.contains(outputConverterClassKey)) {
- asterixdbParameterBuilder.append(outputConverterClassKey + outputConverterClassValue);
- }
- cmds.add(asterixdbParameterBuilder.toString() + s);
- meetCustProp = false;
- custPropAdded = true;
- continue;
- }
- cmds.add(s);
- if (s.equals(customizedPregelixProperty)) {
- meetCustProp = true;
- }
- }
-
- if (!custPropAdded) {
- cmds.add(customizedPregelixProperty);
- // Appends default converter classes to asterixdbParameterBuilder.
- asterixdbParameterBuilder.append(inputConverterClassKey + inputConverterClassValue);
- asterixdbParameterBuilder.append(outputConverterClassKey + outputConverterClassValue);
- // Remove the last comma.
- asterixdbParameterBuilder.delete(asterixdbParameterBuilder.length() - 1,
- asterixdbParameterBuilder.length());
- cmds.add(asterixdbParameterBuilder.toString());
- }
- return cmds;
- }
-
@Override
public String getActiveDataverseName(String dataverse) {
return (dataverse != null) ? dataverse : activeDataverse.getDataverseName();
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/java/org/apache/asterix/aql/translator/QueryTranslatorTest.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/aql/translator/QueryTranslatorTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/aql/translator/QueryTranslatorTest.java
deleted file mode 100644
index 51c512a..0000000
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/aql/translator/QueryTranslatorTest.java
+++ /dev/null
@@ -1,117 +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.aql.translator;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.asterix.app.translator.DefaultStatementExecutorFactory;
-import org.apache.asterix.common.config.ExternalProperties;
-import org.apache.asterix.compiler.provider.AqlCompilationProvider;
-import org.apache.asterix.file.StorageComponentProvider;
-import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.lang.common.statement.RunStatement;
-import org.apache.asterix.runtime.utils.CcApplicationContext;
-import org.apache.asterix.translator.IStatementExecutor;
-import org.apache.asterix.translator.SessionOutput;
-import org.apache.hyracks.api.application.ICCServiceContext;
-import org.apache.hyracks.api.client.ClusterControllerInfo;
-import org.apache.hyracks.api.config.IApplicationConfig;
-import org.apache.hyracks.api.context.ICCContext;
-import org.apache.hyracks.control.common.controllers.CCConfig;
-import org.junit.Assert;
-import org.junit.Test;
-
-import junit.extensions.PA;
-
-@SuppressWarnings({ "unchecked" })
-public class QueryTranslatorTest {
-
- @Test
- public void test() throws Exception {
- List<Statement> statements = new ArrayList<>();
- SessionOutput mockSessionOutput = mock(SessionOutput.class);
- RunStatement mockRunStatement = mock(RunStatement.class);
-
- // Mocks AppContextInfo.
- CcApplicationContext mockAsterixAppContextInfo = mock(CcApplicationContext.class);
- ExternalProperties mockAsterixExternalProperties = mock(ExternalProperties.class);
- when(mockAsterixAppContextInfo.getExternalProperties()).thenReturn(mockAsterixExternalProperties);
- when(mockAsterixExternalProperties.getAPIServerPort()).thenReturn(19002);
- ICCServiceContext mockServiceContext = mock(ICCServiceContext.class);
- when(mockAsterixAppContextInfo.getServiceContext()).thenReturn(mockServiceContext);
- ICCContext mockCCContext = mock(ICCContext.class);
- when(mockServiceContext.getCCContext()).thenReturn(mockCCContext);
- ClusterControllerInfo mockCCInfo = mock(ClusterControllerInfo.class);
- when(mockCCContext.getClusterControllerInfo()).thenReturn(mockCCInfo);
- when(mockCCInfo.getClientNetAddress()).thenReturn("127.0.0.1");
- IApplicationConfig mockApplicationConfig = mock(IApplicationConfig.class);
- when(mockServiceContext.getAppConfig()).thenReturn(mockApplicationConfig);
- when(mockApplicationConfig.getBoolean(CCConfig.Option.ENFORCE_FRAME_WRITER_PROTOCOL)).thenReturn(true);
-
- IStatementExecutor aqlTranslator = new DefaultStatementExecutorFactory().create(mockAsterixAppContextInfo,
- statements, mockSessionOutput, new AqlCompilationProvider(), new StorageComponentProvider());
- List<String> parameters = new ArrayList<>();
- parameters.add("examples/pregelix-example-jar-with-dependencies.jar");
- parameters.add("org.apache.pregelix.example.PageRankVertex");
- parameters.add("-ip 10.0.2.15 -port 3199");
- when(mockRunStatement.getParameters()).thenReturn(parameters);
- // Test a customer command without "-cust-prop".
- List<String> cmds = (List<String>) PA.invokeMethod(aqlTranslator,
- "constructPregelixCommand(org.apache.asterix.lang.common.statement.RunStatement,"
- + "String,String,String,String)",
- mockRunStatement, "fromDataverse", "fromDataset", "toDataverse", "toDataset");
- List<String> expectedCmds = Arrays.asList(new String[] { "bin/pregelix",
- "examples/pregelix-example-jar-with-dependencies.jar", "org.apache.pregelix.example.PageRankVertex",
- "-ip", "10.0.2.15", "-port", "3199", "-cust-prop",
- "pregelix.asterixdb.url=http://127.0.0.1:19002,pregelix.asterixdb.source=true,pregelix.asterixdb.sink=true,pregelix.asterixdb.input.dataverse=fromDataverse,pregelix.asterixdb.input.dataset=fromDataset,pregelix.asterixdb.output.dataverse=toDataverse,pregelix.asterixdb.output.dataset=toDataset,pregelix.asterixdb.output.cleanup=false,pregelix.asterixdb.input.converterclass=org.apache.pregelix.example.converter.VLongIdInputVertexConverter,pregelix.asterixdb.output.converterclass=org.apache.pregelix.example.converter.VLongIdOutputVertexConverter" });
- Assert.assertEquals(cmds, expectedCmds);
-
- parameters.remove(parameters.size() - 1);
- parameters.add("-ip 10.0.2.15 -port 3199 -cust-prop "
- + "pregelix.asterixdb.input.converterclass=org.apache.pregelix.example.converter.TestInputVertexConverter,"
- + "pregelix.asterixdb.output.converterclass=org.apache.pregelix.example.converter.TestOutputVertexConverter");
- // Test a customer command with "-cust-prop".
- cmds = (List<String>) PA.invokeMethod(aqlTranslator,
- "constructPregelixCommand(org.apache.asterix.lang.common.statement.RunStatement,"
- + "String,String,String,String)",
- mockRunStatement, "fromDataverse", "fromDataset", "toDataverse", "toDataset");
- expectedCmds = Arrays.asList(new String[] { "bin/pregelix",
- "examples/pregelix-example-jar-with-dependencies.jar", "org.apache.pregelix.example.PageRankVertex",
- "-ip", "10.0.2.15", "-port", "3199", "-cust-prop",
- "pregelix.asterixdb.url=http://127.0.0.1:19002,pregelix.asterixdb.source=true,pregelix.asterixdb.sink=true,pregelix.asterixdb.input.dataverse=fromDataverse,pregelix.asterixdb.input.dataset=fromDataset,pregelix.asterixdb.output.dataverse=toDataverse,pregelix.asterixdb.output.dataset=toDataset,pregelix.asterixdb.output.cleanup=false,pregelix.asterixdb.input.converterclass=org.apache.pregelix.example.converter.TestInputVertexConverter,pregelix.asterixdb.output.converterclass=org.apache.pregelix.example.converter.TestOutputVertexConverter" });
- Assert.assertEquals(cmds, expectedCmds);
- }
-
- private void setFinalStaticField(Field field, Object newValue) throws Exception {
- field.setAccessible(true);
- // remove final modifier from field
- Field modifiersField = Field.class.getDeclaredField("modifiers");
- modifiersField.setAccessible(true);
- modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
- field.set(null, newValue);
- }
-}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.1.ddl.aql
deleted file mode 100644
index 4a7acd0..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.1.ddl.aql
+++ /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.
- */
-drop dataverse Pregelix if exists;
-create dataverse Pregelix
-use dataverse Pregelix
-
-create type TwitterUserType as open {
- screen-name: string,
- lang: string,
- friends_count: int32,
- statuses_count: int32,
- name: string,
- followers_count: int32
-}
-
-create type TweetMessageType as open {
- tweetid: int64,
- user: TwitterUserType,
- sender-location: point?,
- send-time: datetime,
- referred-topics: {{ string }},
- message-text: string,
- retweeted-from: int64,
- forwarded-from: int64
-}
-
-create dataset TwitterMsgs(TweetMessageType)
- primary key tweetid;
-
-create dataset TwitterUsers(TwitterUserType)
- primary key screen-name;
-
- create type TMEdge as open {
- tweetid: int64,
- value: float?
- }
-
- create type TMGraph as open {
- tweetid: int64,
- rank-value: double?,
- populated-by: {{TMEdge}}
- }
-
-
-create dataset MyInputGraph(TMGraph)
- primary key tweetid;
-
-create dataset MyOutputGraph(TMGraph)
- primary key tweetid;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.2.update.aql
deleted file mode 100644
index e679951..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.2.update.aql
+++ /dev/null
@@ -1,52 +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.
- */
-use dataverse Pregelix;
-
-insert into dataset TwitterUsers (
-{{
-{"screen-name":"NathanGiesen@211","lang":"en","friends_count":18,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},
-{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},
-{"screen-name":"NilaMilliron_tw","lang":"en","friends_count":445,"statuses_count":164,"name":"Nila Milliron","followers_count":22649},
-{"screen-name":"ChangEwing_573","lang":"en","friends_count":182,"statuses_count":394,"name":"Chang Ewing","followers_count":32136}
-}})
-
-insert into dataset TwitterMsgs (
-{{
- {"tweetid":1,"user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("47.44,80.65"),"send-time":datetime("2008-04-26T10:10:00"),"referred-topics":{{"t-mobile","customization"}},"message-text":" love t-mobile its customization is good:)", "retweeted-from":2, "forwarded-from":3},
- {"tweetid":2,"user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("32.84,67.14"),"send-time":datetime("2010-05-13T10:10:00"),"referred-topics":{{"verizon","shortcut-menu"}},"message-text":" like verizon its shortcut-menu is awesome:)", "retweeted-from":7, "forwarded-from":1},
- {"tweetid":3,"user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("29.72,75.8"),"send-time":datetime("2006-11-04T10:10:00"),"referred-topics":{{"motorola","speed"}},"message-text":" like motorola the speed is good:)", "retweeted-from":8, "forwarded-from":6},
- {"tweetid":4,"user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("39.28,70.48"),"send-time":datetime("2011-12-26T10:10:00"),"referred-topics":{{"sprint","voice-command"}},"message-text":" like sprint the voice-command is mind-blowing:)", "retweeted-from":1, "forwarded-from":3},
- {"tweetid":5,"user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("40.09,92.69"),"send-time":datetime("2006-08-04T10:10:00"),"referred-topics":{{"motorola","speed"}},"message-text":" can't stand motorola its speed is terrible:(", "retweeted-from":8, "forwarded-from":6},
- {"tweetid":6,"user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("47.51,83.99"),"send-time":datetime("2010-05-07T10:10:00"),"referred-topics":{{"iphone","voice-clarity"}},"message-text":" like iphone the voice-clarity is good:)", "retweeted-from":4, "forwarded-from":5},
- {"tweetid":7,"user":{"screen-name":"ChangEwing_573","lang":"en","friends_count":182,"statuses_count":394,"name":"Chang Ewing","followers_count":32136},"sender-location":point("36.21,72.6"),"send-time":datetime("2011-08-25T10:10:00"),"referred-topics":{{"samsung","platform"}},"message-text":" like samsung the platform is good", "retweeted-from":2, "forwarded-from":7},
- {"tweetid":8,"user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("46.05,93.34"),"send-time":datetime("2005-10-14T10:10:00"),"referred-topics":{{"t-mobile","shortcut-menu"}},"message-text":" like t-mobile the shortcut-menu is awesome:)", "retweeted-from":3, "forwarded-from":7},
- {"tweetid":9,"user":{"screen-name":"NathanGiesen@211","lang":"en","friends_count":39339,"statuses_count":473,"name":"Nathan Giesen","followers_count":49416},"sender-location":point("36.86,74.62"),"send-time":datetime("2012-07-21T10:10:00"),"referred-topics":{{"verizon","voicemail-service"}},"message-text":" love verizon its voicemail-service is awesome", "retweeted-from":6, "forwarded-from":2},
- {"tweetid":10,"user":{"screen-name":"ColineGeyer@63","lang":"en","friends_count":121,"statuses_count":362,"name":"Coline Geyer","followers_count":17159},"sender-location":point("29.15,76.53"),"send-time":datetime("2008-01-26T10:10:00"),"referred-topics":{{"verizon","voice-clarity"}},"message-text":" hate verizon its voice-clarity is OMG:(", "retweeted-from":4, "forwarded-from":5},
- {"tweetid":11,"user":{"screen-name":"NilaMilliron_tw","lang":"en","friends_count":445,"statuses_count":164,"name":"Nila Milliron","followers_count":22649},"sender-location":point("37.59,68.42"),"send-time":datetime("2008-03-09T10:10:00"),"referred-topics":{{"iphone","platform"}},"message-text":" can't stand iphone its platform is terrible", "retweeted-from":6, "forwarded-from":3},
- {"tweetid":12,"user":{"screen-name":"OliJackson_512","lang":"en","friends_count":445,"statuses_count":164,"name":"Oli Jackson","followers_count":22649},"sender-location":point("24.82,94.63"),"send-time":datetime("2010-02-13T10:10:00"),"referred-topics":{{"samsung","voice-command"}},"message-text":" like samsung the voice-command is amazing:)", "retweeted-from":6, "forwarded-from":5}
-}})
-
-insert into dataset MyInputGraph
-for $tm in dataset TwitterMsgs
-let $links:={{ {"tweetid":$tm.retweeted-from}, {"tweetid":$tm.forwarded-from}}}
-return {
- "tweetid": $tm.tweetid,
- "rank-value": 0.0,
- "populated-by": $links
-}
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.3.query.aql
deleted file mode 100644
index d317355..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q01/pregel-q01.3.query.aql
+++ /dev/null
@@ -1,27 +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.
- */
-use dataverse Pregelix;
-
-run pregel("examples/pregelix-example-0.2.14-SNAPSHOT-jar-with-dependencies.jar"
- "org.apache.pregelix.example.PageRankVertex"
- "-ip 10.0.2.15 -port 3199 -vnum 17")
-from dataset MyInputGraph
-to dataset MyOutputGraph;
-
-for $n in dataset MyOutputGraph return $n;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.1.ddl.aql
deleted file mode 100644
index d7a495a..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.1.ddl.aql
+++ /dev/null
@@ -1,34 +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.
- */
-drop dataverse Pregelix if exists;
-create dataverse Pregelix
-use dataverse Pregelix
-
-create type EdgeType as open {
- destVertexId: int64,
- value: float?
-}
-create type NodeType as open {
- id: int64,
- value: int64?,
- edges: {{EdgeType}}
-}
-
-create dataset InputGraph(NodeType) primary key id;
-create dataset ResultGraph(NodeType) primary key id;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.2.update.aql
deleted file mode 100644
index 8f6ca9c..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.2.update.aql
+++ /dev/null
@@ -1,45 +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.
- */
-use dataverse Pregelix;
-
-insert into dataset InputGraph (
-{{
- {"id":0,"value":0,"edges":{{ {"destVertexId":1}}}},
-{"id":1,"value":1,"edges":{{ {"destVertexId":1},{"destVertexId":2}}}},
-{"id":2,"value":2,"edges":{{ {"destVertexId":1},{"destVertexId":2},{"destVertexId":3}}}},
-{"id":3,"value":3,"edges":{{ {"destVertexId":1},{"destVertexId":2},{"destVertexId":3},{"destVertexId":4}}}},
-{"id":4,"value":4,"edges":{{ {"destVertexId":1},{"destVertexId":2},{"destVertexId":3},{"destVertexId":4},{"destVertexId":5}}}},
-{"id":5,"value":5,"edges":{{ {"destVertexId":1},{"destVertexId":2},{"destVertexId":3},{"destVertexId":4},{"destVertexId":5},{"destVertexId":6}}}},
-{"id":6,"value":6,"edges":{{ {"destVertexId":1},{"destVertexId":2},{"destVertexId":3},{"destVertexId":4},{"destVertexId":5},{"destVertexId":6},{"destVertexId":7}}}},
-{"id":7,"value":7,"edges":{{ {"destVertexId":1},{"destVertexId":2},{"destVertexId":3},{"destVertexId":4},{"destVertexId":5},{"destVertexId":6},{"destVertexId":7},{"destVertexId":8}}}},
-{"id":8,"value":8,"edges":{{ {"destVertexId":1},{"destVertexId":2},{"destVertexId":3},{"destVertexId":4},{"destVertexId":5},{"destVertexId":6},{"destVertexId":7},{"destVertexId":8},{"destVertexId":9}}}},
-{"id":9,"value":9,"edges":{{ {"destVertexId":1},{"destVertexId":2},{"destVertexId":3},{"destVertexId":4},{"destVertexId":5},{"destVertexId":6},{"destVertexId":7},{"destVertexId":8},{"destVertexId":9},{"destVertexId":0}}}},
-{"id":10,"value":10,"edges":{{ {"destVertexId":11}}}},
-{"id":11,"value":11,"edges":{{ {"destVertexId":11},{"destVertexId":12}}}},
-{"id":12,"value":12,"edges":{{ {"destVertexId":11},{"destVertexId":12},{"destVertexId":13}}}},
-{"id":13,"value":13,"edges":{{ {"destVertexId":11},{"destVertexId":12},{"destVertexId":13},{"destVertexId":14}}}},
-{"id":14,"value":14,"edges":{{ {"destVertexId":11},{"destVertexId":12},{"destVertexId":13},{"destVertexId":14},{"destVertexId":15}}}},
-{"id":15,"value":15,"edges":{{ {"destVertexId":11},{"destVertexId":12},{"destVertexId":13},{"destVertexId":14},{"destVertexId":15},{"destVertexId":16}}}},
-{"id":16,"value":16,"edges":{{ {"destVertexId":11},{"destVertexId":12},{"destVertexId":13},{"destVertexId":14},{"destVertexId":15},{"destVertexId":16},{"destVertexId":17}}}},
-{"id":17,"value":17,"edges":{{ {"destVertexId":11},{"destVertexId":12},{"destVertexId":13},{"destVertexId":14},{"destVertexId":15},{"destVertexId":16},{"destVertexId":17},{"destVertexId":18}}}},
-{"id":18,"value":18,"edges":{{ {"destVertexId":11},{"destVertexId":12},{"destVertexId":13},{"destVertexId":14},{"destVertexId":15},{"destVertexId":16},{"destVertexId":17},{"destVertexId":18},{"destVertexId":19}}}},
-{"id":19,"value":19,"edges":{{ {"destVertexId":11},{"destVertexId":12},{"destVertexId":13},{"destVertexId":14},{"destVertexId":15},{"destVertexId":16},{"destVertexId":17},{"destVertexId":18},{"destVertexId":19}, {"destVertexId":10}}}}
-}}
-
-)
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.3.query.aql
deleted file mode 100644
index 23a5215..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q02/pregel-q02.3.query.aql
+++ /dev/null
@@ -1,27 +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.
- */
-use dataverse Pregelix;
-
-run pregel("examples/pregelix-example-0.2.14-SNAPSHOT-jar-with-dependencies.jar"
- "org.apache.pregelix.example.ConnectedComponentsVertex"
- "-ip 10.0.2.15 -port 3199")
-from dataset InputGraph
-to dataset ResultGraph;
-
-for $n in dataset ResultGraph return $n;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.1.ddl.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.1.ddl.aql
deleted file mode 100644
index 370ad80..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.1.ddl.aql
+++ /dev/null
@@ -1,34 +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.
- */
-drop dataverse Pregelix if exists;
-create dataverse Pregelix
-use dataverse Pregelix
-
-create type EdgeType as open {
- destVertexId: int64,
- cost: float?
-}
-create type NodeType as open {
- id: int64,
- value: double?,
- edges: {{EdgeType}}
-}
-
-create dataset InputGraph(NodeType) primary key id;
-create dataset ResultGraph(NodeType) primary key id;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.2.update.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.2.update.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.2.update.aql
deleted file mode 100644
index 1702cc6..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.2.update.aql
+++ /dev/null
@@ -1,34 +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.
- */
-use dataverse Pregelix;
-
-insert into dataset InputGraph (
-{{
-{"id":0, "edges":{{ {"destVertexId":1, "cost":1.0f}}}},
-{"id":1, "edges":{{ {"destVertexId":3, "cost":4.0f},{"destVertexId":2, "cost":3.0f}}}},
-{"id":2, "edges":{{ {"destVertexId":4, "cost":5.0f},{"destVertexId":5, "cost":23.0f}}}},
-{"id":3, "edges":{{ {"destVertexId":2, "cost":1.0f},{"destVertexId":8, "cost":13.0f}}}},
-{"id":4, "edges":{{ {"destVertexId":1, "cost":5.0f},{"destVertexId":2, "cost":8.0f},{"destVertexId":3, "cost":23.0f},{"destVertexId":4, "cost":12.0f}}}},
-{"id":5, "edges":{{ {"destVertexId":6, "cost":12.0f},{"destVertexId":7, "cost":17.0f}}}},
-{"id":6, "edges":{{ {"destVertexId":1, "cost":12.0f},{"destVertexId":2, "cost":1.0f}}}},
-{"id":7, "edges":{{ {"destVertexId":9, "cost":100.0f}}}},
-{"id":8, "edges":{{ {"destVertexId":4, "cost":11.0f}}}},
-{"id":9, "edges":{{ {"destVertexId":1, "cost":16.0f},{"destVertexId":2, "cost":9.0f}}}}
-}}
-)
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.3.query.aql
deleted file mode 100644
index 3ac6980..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/graph/pregel-q03/pregel-q03.3.query.aql
+++ /dev/null
@@ -1,27 +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.
- */
-use dataverse Pregelix;
-
-run pregel("examples/pregelix-example-0.2.14-SNAPSHOT-jar-with-dependencies.jar"
- "org.apache.pregelix.example.ShortestPathsVertex"
- "-ip 10.0.2.15 -port 3199 -source-vertex 0")
-from dataset InputGraph
-to dataset ResultGraph;
-
-for $n in dataset ResultGraph return $n;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.1.ddl.sqlpp
deleted file mode 100644
index 3ffbbf4..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.1.ddl.sqlpp
+++ /dev/null
@@ -1,68 +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.
- */
-
-drop dataverse Pregelix if exists;
-create dataverse Pregelix;
-
-use Pregelix;
-
-
-create type Pregelix.TwitterUserType as
-{
- `screen-name` : string,
- lang : string,
- friends_count : integer,
- statuses_count : integer,
- name : string,
- followers_count : integer
-};
-
-create type Pregelix.TweetMessageType as
-{
- tweetid : bigint,
- user : TwitterUserType,
- `sender-location` : point?,
- `send-time` : datetime,
- `referred-topics` : {{string}},
- `message-text` : string,
- `retweeted-from` : bigint,
- `forwarded-from` : bigint
-};
-
-create dataset TwitterMsgs(TweetMessageType) primary key tweetid;
-
-create dataset TwitterUsers(TwitterUserType) primary key `screen-name`;
-
-create type Pregelix.TMEdge as
-{
- tweetid : bigint,
- `value` : float?
-};
-
-create type Pregelix.TMGraph as
-{
- tweetid : bigint,
- `rank-value` : double?,
- `populated-by` : {{TMEdge}};
-};
-
-create dataset MyInputGraph(TMGraph) primary key tweetid;
-
-create dataset MyOutputGraph(TMGraph) primary key tweetid;
-
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.2.update.sqlpp
deleted file mode 100644
index dbd9ebe..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.2.update.sqlpp
+++ /dev/null
@@ -1,31 +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.
- */
-
-use Pregelix;
-
-
-insert into TwitterUsers
-select element {{{'screen-name':'NathanGiesen@211','lang':'en','friends_count':18,'statuses_count':473,'name':'Nathan Giesen','followers_count':49416},{'screen-name':'ColineGeyer@63','lang':'en','friends_count':121,'statuses_count':362,'name':'Coline Geyer','followers_count':17159},{'screen-name':'NilaMilliron_tw','lang':'en','friends_count':445,'statuses_count':164,'name':'Nila Milliron','followers_count':22649},{'screen-name':'ChangEwing_573','lang':'en','friends_count':182,'statuses_count':394,'name':'Chang Ewing','followers_count':32136}}};
-insert into TwitterMsgs
-select element {{{'tweetid':1,'user':{'screen-name':'NathanGiesen@211','lang':'en','friends_count':39339,'statuses_count':473,'name':'Nathan Giesen','followers_count':49416},'sender-location':Pregelix.point('47.44,80.65'),'send-time':Pregelix.datetime('2008-04-26T10:10:00'),'referred-topics':{{'t-mobile','customization'}},'message-text':' love t-mobile its customization is good:)','retweeted-from':2,'forwarded-from':3},{'tweetid':2,'user':{'screen-name':'ColineGeyer@63','lang':'en','friends_count':121,'statuses_count':362,'name':'Coline Geyer','followers_count':17159},'sender-location':Pregelix.point('32.84,67.14'),'send-time':Pregelix.datetime('2010-05-13T10:10:00'),'referred-topics':{{'verizon','shortcut-menu'}},'message-text':' like verizon its shortcut-menu is awesome:)','retweeted-from':7,'forwarded-from':1},{'tweetid':3,'user':{'screen-name':'NathanGiesen@211','lang':'en','friends_count':39339,'statuses_count':473,'name':'Nathan Giesen','followers_count':49416},'sender-locatio
n':Pregelix.point('29.72,75.8'),'send-time':Pregelix.datetime('2006-11-04T10:10:00'),'referred-topics':{{'motorola','speed'}},'message-text':' like motorola the speed is good:)','retweeted-from':8,'forwarded-from':6},{'tweetid':4,'user':{'screen-name':'NathanGiesen@211','lang':'en','friends_count':39339,'statuses_count':473,'name':'Nathan Giesen','followers_count':49416},'sender-location':Pregelix.point('39.28,70.48'),'send-time':Pregelix.datetime('2011-12-26T10:10:00'),'referred-topics':{{'sprint','voice-command'}},'message-text':' like sprint the voice-command is mind-blowing:)','retweeted-from':1,'forwarded-from':3},{'tweetid':5,'user':{'screen-name':'NathanGiesen@211','lang':'en','friends_count':39339,'statuses_count':473,'name':'Nathan Giesen','followers_count':49416},'sender-location':Pregelix.point('40.09,92.69'),'send-time':Pregelix.datetime('2006-08-04T10:10:00'),'referred-topics':{{'motorola','speed'}},'message-text':' can\'t stand motorola its speed is terrible:(','retwee
ted-from':8,'forwarded-from':6},{'tweetid':6,'user':{'screen-name':'ColineGeyer@63','lang':'en','friends_count':121,'statuses_count':362,'name':'Coline Geyer','followers_count':17159},'sender-location':Pregelix.point('47.51,83.99'),'send-time':Pregelix.datetime('2010-05-07T10:10:00'),'referred-topics':{{'iphone','voice-clarity'}},'message-text':' like iphone the voice-clarity is good:)','retweeted-from':4,'forwarded-from':5},{'tweetid':7,'user':{'screen-name':'ChangEwing_573','lang':'en','friends_count':182,'statuses_count':394,'name':'Chang Ewing','followers_count':32136},'sender-location':Pregelix.point('36.21,72.6'),'send-time':Pregelix.datetime('2011-08-25T10:10:00'),'referred-topics':{{'samsung','platform'}},'message-text':' like samsung the platform is good','retweeted-from':2,'forwarded-from':7},{'tweetid':8,'user':{'screen-name':'NathanGiesen@211','lang':'en','friends_count':39339,'statuses_count':473,'name':'Nathan Giesen','followers_count':49416},'sender-location':Pregelix
.point('46.05,93.34'),'send-time':Pregelix.datetime('2005-10-14T10:10:00'),'referred-topics':{{'t-mobile','shortcut-menu'}},'message-text':' like t-mobile the shortcut-menu is awesome:)','retweeted-from':3,'forwarded-from':7},{'tweetid':9,'user':{'screen-name':'NathanGiesen@211','lang':'en','friends_count':39339,'statuses_count':473,'name':'Nathan Giesen','followers_count':49416},'sender-location':Pregelix.point('36.86,74.62'),'send-time':Pregelix.datetime('2012-07-21T10:10:00'),'referred-topics':{{'verizon','voicemail-service'}},'message-text':' love verizon its voicemail-service is awesome','retweeted-from':6,'forwarded-from':2},{'tweetid':10,'user':{'screen-name':'ColineGeyer@63','lang':'en','friends_count':121,'statuses_count':362,'name':'Coline Geyer','followers_count':17159},'sender-location':Pregelix.point('29.15,76.53'),'send-time':Pregelix.datetime('2008-01-26T10:10:00'),'referred-topics':{{'verizon','voice-clarity'}},'message-text':' hate verizon its voice-clarity is OMG:(
','retweeted-from':4,'forwarded-from':5},{'tweetid':11,'user':{'screen-name':'NilaMilliron_tw','lang':'en','friends_count':445,'statuses_count':164,'name':'Nila Milliron','followers_count':22649},'sender-location':Pregelix.point('37.59,68.42'),'send-time':Pregelix.datetime('2008-03-09T10:10:00'),'referred-topics':{{'iphone','platform'}},'message-text':' can\'t stand iphone its platform is terrible','retweeted-from':6,'forwarded-from':3},{'tweetid':12,'user':{'screen-name':'OliJackson_512','lang':'en','friends_count':445,'statuses_count':164,'name':'Oli Jackson','followers_count':22649},'sender-location':Pregelix.point('24.82,94.63'),'send-time':Pregelix.datetime('2010-02-13T10:10:00'),'referred-topics':{{'samsung','voice-command'}},'message-text':' like samsung the voice-command is amazing:)','retweeted-from':6,'forwarded-from':5}}};
-insert into MyInputGraph
-select element {'tweetid':tm.tweetid,'rank-value':0.0,'populated-by':links}
-from TwitterMsgs as tm
-with links as {{{'tweetid':tm.`retweeted-from`},{'tweetid':tm.`forwarded-from`}}}
-;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.3.query.sqlpp
deleted file mode 100644
index 0a70a27..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q01/pregel-q01.3.query.sqlpp
+++ /dev/null
@@ -1,25 +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.
- */
-
-use Pregelix;
-
-
-select element n
-from MyOutputGraph as n
-;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.1.ddl.sqlpp
deleted file mode 100644
index c9e6b15..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.1.ddl.sqlpp
+++ /dev/null
@@ -1,42 +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.
- */
-
-drop dataverse Pregelix if exists;
-create dataverse Pregelix;
-
-use Pregelix;
-
-
-create type Pregelix.EdgeType as
-{
- destVertexId : bigint,
- `value` : float?
-};
-
-create type Pregelix.NodeType as
-{
- id : bigint,
- `value` : bigint?,
- edges : {{EdgeType}};
-};
-
-create dataset InputGraph(NodeType) primary key id;
-
-create dataset ResultGraph(NodeType) primary key id;
-
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.2.update.sqlpp
deleted file mode 100644
index 2ec9add..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.2.update.sqlpp
+++ /dev/null
@@ -1,24 +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.
- */
-
-use Pregelix;
-
-
-insert into InputGraph
-select element {{{'id':0,'value':0,'edges':{{{'destVertexId':1}}}},{'id':1,'value':1,'edges':{{{'destVertexId':1},{'destVertexId':2}}}},{'id':2,'value':2,'edges':{{{'destVertexId':1},{'destVertexId':2},{'destVertexId':3}}}},{'id':3,'value':3,'edges':{{{'destVertexId':1},{'destVertexId':2},{'destVertexId':3},{'destVertexId':4}}}},{'id':4,'value':4,'edges':{{{'destVertexId':1},{'destVertexId':2},{'destVertexId':3},{'destVertexId':4},{'destVertexId':5}}}},{'id':5,'value':5,'edges':{{{'destVertexId':1},{'destVertexId':2},{'destVertexId':3},{'destVertexId':4},{'destVertexId':5},{'destVertexId':6}}}},{'id':6,'value':6,'edges':{{{'destVertexId':1},{'destVertexId':2},{'destVertexId':3},{'destVertexId':4},{'destVertexId':5},{'destVertexId':6},{'destVertexId':7}}}},{'id':7,'value':7,'edges':{{{'destVertexId':1},{'destVertexId':2},{'destVertexId':3},{'destVertexId':4},{'destVertexId':5},{'destVertexId':6},{'destVertexId':7},{'destVertexId':8}}}},{'id':8,'value':8,'edges':{{{'destVertexId':1},{
'destVertexId':2},{'destVertexId':3},{'destVertexId':4},{'destVertexId':5},{'destVertexId':6},{'destVertexId':7},{'destVertexId':8},{'destVertexId':9}}}},{'id':9,'value':9,'edges':{{{'destVertexId':1},{'destVertexId':2},{'destVertexId':3},{'destVertexId':4},{'destVertexId':5},{'destVertexId':6},{'destVertexId':7},{'destVertexId':8},{'destVertexId':9},{'destVertexId':0}}}},{'id':10,'value':10,'edges':{{{'destVertexId':11}}}},{'id':11,'value':11,'edges':{{{'destVertexId':11},{'destVertexId':12}}}},{'id':12,'value':12,'edges':{{{'destVertexId':11},{'destVertexId':12},{'destVertexId':13}}}},{'id':13,'value':13,'edges':{{{'destVertexId':11},{'destVertexId':12},{'destVertexId':13},{'destVertexId':14}}}},{'id':14,'value':14,'edges':{{{'destVertexId':11},{'destVertexId':12},{'destVertexId':13},{'destVertexId':14},{'destVertexId':15}}}},{'id':15,'value':15,'edges':{{{'destVertexId':11},{'destVertexId':12},{'destVertexId':13},{'destVertexId':14},{'destVertexId':15},{'destVertexId':16}}}},{'id
':16,'value':16,'edges':{{{'destVertexId':11},{'destVertexId':12},{'destVertexId':13},{'destVertexId':14},{'destVertexId':15},{'destVertexId':16},{'destVertexId':17}}}},{'id':17,'value':17,'edges':{{{'destVertexId':11},{'destVertexId':12},{'destVertexId':13},{'destVertexId':14},{'destVertexId':15},{'destVertexId':16},{'destVertexId':17},{'destVertexId':18}}}},{'id':18,'value':18,'edges':{{{'destVertexId':11},{'destVertexId':12},{'destVertexId':13},{'destVertexId':14},{'destVertexId':15},{'destVertexId':16},{'destVertexId':17},{'destVertexId':18},{'destVertexId':19}}}},{'id':19,'value':19,'edges':{{{'destVertexId':11},{'destVertexId':12},{'destVertexId':13},{'destVertexId':14},{'destVertexId':15},{'destVertexId':16},{'destVertexId':17},{'destVertexId':18},{'destVertexId':19},{'destVertexId':10}}}}}};
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.3.query.sqlpp
deleted file mode 100644
index 99f49c1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q02/pregel-q02.3.query.sqlpp
+++ /dev/null
@@ -1,25 +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.
- */
-
-use Pregelix;
-
-
-select element n
-from ResultGraph as n
-;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.1.ddl.sqlpp
deleted file mode 100644
index d56e013..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.1.ddl.sqlpp
+++ /dev/null
@@ -1,42 +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.
- */
-
-drop dataverse Pregelix if exists;
-create dataverse Pregelix;
-
-use Pregelix;
-
-
-create type Pregelix.EdgeType as
-{
- destVertexId : bigint,
- cost : float?
-};
-
-create type Pregelix.NodeType as
-{
- id : bigint,
- `value` : double?,
- edges : {{EdgeType}};
-};
-
-create dataset InputGraph(NodeType) primary key id;
-
-create dataset ResultGraph(NodeType) primary key id;
-
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.2.update.sqlpp
deleted file mode 100644
index 6b89842..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.2.update.sqlpp
+++ /dev/null
@@ -1,24 +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.
- */
-
-use Pregelix;
-
-
-insert into InputGraph
-select element {{{'id':0,'edges':{{{'destVertexId':1,'cost':1.000000f}}}},{'id':1,'edges':{{{'destVertexId':3,'cost':4.000000f},{'destVertexId':2,'cost':3.000000f}}}},{'id':2,'edges':{{{'destVertexId':4,'cost':5.000000f},{'destVertexId':5,'cost':23.000000f}}}},{'id':3,'edges':{{{'destVertexId':2,'cost':1.000000f},{'destVertexId':8,'cost':13.000000f}}}},{'id':4,'edges':{{{'destVertexId':1,'cost':5.000000f},{'destVertexId':2,'cost':8.000000f},{'destVertexId':3,'cost':23.000000f},{'destVertexId':4,'cost':12.000000f}}}},{'id':5,'edges':{{{'destVertexId':6,'cost':12.000000f},{'destVertexId':7,'cost':17.000000f}}}},{'id':6,'edges':{{{'destVertexId':1,'cost':12.000000f},{'destVertexId':2,'cost':1.000000f}}}},{'id':7,'edges':{{{'destVertexId':9,'cost':100.000000f}}}},{'id':8,'edges':{{{'destVertexId':4,'cost':11.000000f}}}},{'id':9,'edges':{{{'destVertexId':1,'cost':16.000000f},{'destVertexId':2,'cost':9.000000f}}}}}};
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.3.query.sqlpp
deleted file mode 100644
index 99f49c1..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/graph/pregel-q03/pregel-q03.3.query.sqlpp
+++ /dev/null
@@ -1,25 +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.
- */
-
-use Pregelix;
-
-
-select element n
-from ResultGraph as n
-;
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/results/graph/pregel-q01/pregel-q01.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/graph/pregel-q01/pregel-q01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/graph/pregel-q01/pregel-q01.1.adm
deleted file mode 100644
index 4f747e2..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/graph/pregel-q01/pregel-q01.1.adm
+++ /dev/null
@@ -1,12 +0,0 @@
-{ "tweetid": 1i64, "rank-value": 0.07349647505081802d, "populated-by": {{ { "tweetid": 2i64, "value": 0.0f }, { "tweetid": 3i64, "value": 0.0f } }} }
-{ "tweetid": 2i64, "rank-value": 0.10497306443795257d, "populated-by": {{ { "tweetid": 7i64, "value": 0.0f }, { "tweetid": 1i64, "value": 0.0f } }} }
-{ "tweetid": 3i64, "rank-value": 0.09458886502271134d, "populated-by": {{ { "tweetid": 8i64, "value": 0.0f }, { "tweetid": 6i64, "value": 0.0f } }} }
-{ "tweetid": 4i64, "rank-value": 0.04783722202788025d, "populated-by": {{ { "tweetid": 1i64, "value": 0.0f }, { "tweetid": 3i64, "value": 0.0f } }} }
-{ "tweetid": 5i64, "rank-value": 0.051587222027880256d, "populated-by": {{ { "tweetid": 8i64, "value": 0.0f }, { "tweetid": 6i64, "value": 0.0f } }} }
-{ "tweetid": 6i64, "rank-value": 0.0822549135142923d, "populated-by": {{ { "tweetid": 4i64, "value": 0.0f }, { "tweetid": 5i64, "value": 0.0f } }} }
-{ "tweetid": 7i64, "rank-value": 0.14484555969829038d, "populated-by": {{ { "tweetid": 2i64, "value": 0.0f }, { "tweetid": 7i64, "value": 0.0f } }} }
-{ "tweetid": 8i64, "rank-value": 0.0710049135142923d, "populated-by": {{ { "tweetid": 3i64, "value": 0.0f }, { "tweetid": 7i64, "value": 0.0f } }} }
-{ "tweetid": 9i64, "rank-value": 0.008823529411764706d, "populated-by": {{ { "tweetid": 6i64, "value": 0.0f }, { "tweetid": 2i64, "value": 0.0f } }} }
-{ "tweetid": 10i64, "rank-value": 0.008823529411764706d, "populated-by": {{ { "tweetid": 4i64, "value": 0.0f }, { "tweetid": 5i64, "value": 0.0f } }} }
-{ "tweetid": 11i64, "rank-value": 0.008823529411764706d, "populated-by": {{ { "tweetid": 6i64, "value": 0.0f }, { "tweetid": 3i64, "value": 0.0f } }} }
-{ "tweetid": 12i64, "rank-value": 0.008823529411764706d, "populated-by": {{ { "tweetid": 6i64, "value": 0.0f }, { "tweetid": 5i64, "value": 0.0f } }} }
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/64d49fb6/asterixdb/asterix-app/src/test/resources/runtimets/results/graph/pregel-q02/pregel-q02.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/graph/pregel-q02/pregel-q02.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/graph/pregel-q02/pregel-q02.1.adm
deleted file mode 100644
index c5e21b0..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/graph/pregel-q02/pregel-q02.1.adm
+++ /dev/null
@@ -1,20 +0,0 @@
-{ "id": 0i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f } }} }
-{ "id": 1i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f } }} }
-{ "id": 2i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f }, { "destVertexId": 3i64, "value": 0.0f } }} }
-{ "id": 3i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f }, { "destVertexId": 3i64, "value": 0.0f }, { "destVertexId": 4i64, "value": 0.0f } }} }
-{ "id": 4i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f }, { "destVertexId": 3i64, "value": 0.0f }, { "destVertexId": 4i64, "value": 0.0f }, { "destVertexId": 5i64, "value": 0.0f } }} }
-{ "id": 5i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f }, { "destVertexId": 3i64, "value": 0.0f }, { "destVertexId": 4i64, "value": 0.0f }, { "destVertexId": 5i64, "value": 0.0f }, { "destVertexId": 6i64, "value": 0.0f } }} }
-{ "id": 6i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f }, { "destVertexId": 3i64, "value": 0.0f }, { "destVertexId": 4i64, "value": 0.0f }, { "destVertexId": 5i64, "value": 0.0f }, { "destVertexId": 6i64, "value": 0.0f }, { "destVertexId": 7i64, "value": 0.0f } }} }
-{ "id": 7i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f }, { "destVertexId": 3i64, "value": 0.0f }, { "destVertexId": 4i64, "value": 0.0f }, { "destVertexId": 5i64, "value": 0.0f }, { "destVertexId": 6i64, "value": 0.0f }, { "destVertexId": 7i64, "value": 0.0f }, { "destVertexId": 8i64, "value": 0.0f } }} }
-{ "id": 8i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f }, { "destVertexId": 3i64, "value": 0.0f }, { "destVertexId": 4i64, "value": 0.0f }, { "destVertexId": 5i64, "value": 0.0f }, { "destVertexId": 6i64, "value": 0.0f }, { "destVertexId": 7i64, "value": 0.0f }, { "destVertexId": 8i64, "value": 0.0f }, { "destVertexId": 9i64, "value": 0.0f } }} }
-{ "id": 9i64, "value": 0i64, "edges": {{ { "destVertexId": 1i64, "value": 0.0f }, { "destVertexId": 2i64, "value": 0.0f }, { "destVertexId": 3i64, "value": 0.0f }, { "destVertexId": 4i64, "value": 0.0f }, { "destVertexId": 5i64, "value": 0.0f }, { "destVertexId": 6i64, "value": 0.0f }, { "destVertexId": 7i64, "value": 0.0f }, { "destVertexId": 8i64, "value": 0.0f }, { "destVertexId": 9i64, "value": 0.0f }, { "destVertexId": 0i64, "value": 0.0f } }} }
-{ "id": 10i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f } }} }
-{ "id": 11i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f } }} }
-{ "id": 12i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f }, { "destVertexId": 13i64, "value": 0.0f } }} }
-{ "id": 13i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f }, { "destVertexId": 13i64, "value": 0.0f }, { "destVertexId": 14i64, "value": 0.0f } }} }
-{ "id": 14i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f }, { "destVertexId": 13i64, "value": 0.0f }, { "destVertexId": 14i64, "value": 0.0f }, { "destVertexId": 15i64, "value": 0.0f } }} }
-{ "id": 15i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f }, { "destVertexId": 13i64, "value": 0.0f }, { "destVertexId": 14i64, "value": 0.0f }, { "destVertexId": 15i64, "value": 0.0f }, { "destVertexId": 16i64, "value": 0.0f } }} }
-{ "id": 16i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f }, { "destVertexId": 13i64, "value": 0.0f }, { "destVertexId": 14i64, "value": 0.0f }, { "destVertexId": 15i64, "value": 0.0f }, { "destVertexId": 16i64, "value": 0.0f }, { "destVertexId": 17i64, "value": 0.0f } }} }
-{ "id": 17i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f }, { "destVertexId": 13i64, "value": 0.0f }, { "destVertexId": 14i64, "value": 0.0f }, { "destVertexId": 15i64, "value": 0.0f }, { "destVertexId": 16i64, "value": 0.0f }, { "destVertexId": 17i64, "value": 0.0f }, { "destVertexId": 18i64, "value": 0.0f } }} }
-{ "id": 18i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f }, { "destVertexId": 13i64, "value": 0.0f }, { "destVertexId": 14i64, "value": 0.0f }, { "destVertexId": 15i64, "value": 0.0f }, { "destVertexId": 16i64, "value": 0.0f }, { "destVertexId": 17i64, "value": 0.0f }, { "destVertexId": 18i64, "value": 0.0f }, { "destVertexId": 19i64, "value": 0.0f } }} }
-{ "id": 19i64, "value": 10i64, "edges": {{ { "destVertexId": 11i64, "value": 0.0f }, { "destVertexId": 12i64, "value": 0.0f }, { "destVertexId": 13i64, "value": 0.0f }, { "destVertexId": 14i64, "value": 0.0f }, { "destVertexId": 15i64, "value": 0.0f }, { "destVertexId": 16i64, "value": 0.0f }, { "destVertexId": 17i64, "value": 0.0f }, { "destVertexId": 18i64, "value": 0.0f }, { "destVertexId": 19i64, "value": 0.0f }, { "destVertexId": 10i64, "value": 0.0f } }} }