asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjaco...@apache.org
Subject asterixdb-bad git commit: Updated for Asterix change to remove IStorageComponentProvider
Date Fri, 03 Feb 2017 21:08:30 GMT
Repository: asterixdb-bad
Updated Branches:
  refs/heads/master c91fc3471 -> 3dcf57c4d


Updated for Asterix change to remove IStorageComponentProvider

Change-Id: Ia2c816cb350a93d6212c939efc6d0f21a9816499


Project: http://git-wip-us.apache.org/repos/asf/asterixdb-bad/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb-bad/commit/3dcf57c4
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb-bad/tree/3dcf57c4
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb-bad/diff/3dcf57c4

Branch: refs/heads/master
Commit: 3dcf57c4de9786bfbc544523edd2896d333b0078
Parents: c91fc34
Author: Steven Glenn Jacobs <sjaco002@ucr.edu>
Authored: Fri Feb 3 10:19:34 2017 -0800
Committer: Steven Glenn Jacobs <sjaco002@ucr.edu>
Committed: Fri Feb 3 10:19:34 2017 -0800

----------------------------------------------------------------------
 .../asterix/bad/lang/BADQueryTranslatorFactory.java   |  5 +++--
 .../apache/asterix/bad/lang/BADStatementExecutor.java |  5 +++--
 .../bad/lang/statement/ChannelDropStatement.java      |  2 +-
 .../bad/lang/statement/CreateChannelStatement.java    | 10 +++++-----
 .../asterix/bad/metadata/BADMetadataExtension.java    | 14 ++++++++------
 .../asterix/bad/metadata/ChannelEventsListener.java   |  2 +-
 6 files changed, 21 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/3dcf57c4/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
----------------------------------------------------------------------
diff --git a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
index 958b14f..8960c70 100644
--- a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
+++ b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
@@ -22,6 +22,7 @@ import java.util.List;
 
 import org.apache.asterix.app.translator.DefaultStatementExecutorFactory;
 import org.apache.asterix.app.translator.QueryTranslator;
+import org.apache.asterix.common.context.IStorageComponentProvider;
 import org.apache.asterix.compiler.provider.ILangCompilationProvider;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.translator.SessionConfig;
@@ -30,7 +31,7 @@ public class BADQueryTranslatorFactory extends DefaultStatementExecutorFactory
{
 
     @Override
     public QueryTranslator create(List<Statement> statements, SessionConfig conf,
-            ILangCompilationProvider compilationProvider) {
-        return new BADStatementExecutor(statements, conf, compilationProvider);
+            ILangCompilationProvider compilationProvider, IStorageComponentProvider storageComponentProvider)
{
+        return new BADStatementExecutor(statements, conf, compilationProvider, storageComponentProvider);
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/3dcf57c4/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
----------------------------------------------------------------------
diff --git a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
index fa18867..7e73d86 100644
--- a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
+++ b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
@@ -25,6 +25,7 @@ import org.apache.asterix.bad.lang.statement.BrokerDropStatement;
 import org.apache.asterix.bad.lang.statement.ChannelDropStatement;
 import org.apache.asterix.bad.metadata.Broker;
 import org.apache.asterix.bad.metadata.Channel;
+import org.apache.asterix.common.context.IStorageComponentProvider;
 import org.apache.asterix.compiler.provider.ILangCompilationProvider;
 import org.apache.asterix.lang.common.base.Statement;
 import org.apache.asterix.lang.common.statement.DataverseDropStatement;
@@ -38,8 +39,8 @@ import org.apache.hyracks.api.client.IHyracksClientConnection;
 public class BADStatementExecutor extends QueryTranslator {
 
     public BADStatementExecutor(List<Statement> aqlStatements, SessionConfig conf,
-            ILangCompilationProvider compliationProvider) {
-        super(aqlStatements, conf, compliationProvider);
+            ILangCompilationProvider compliationProvider, IStorageComponentProvider storageComponentProvider)
{
+        super(aqlStatements, conf, compliationProvider, storageComponentProvider);
     }
 
 

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/3dcf57c4/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
----------------------------------------------------------------------
diff --git a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
index 94206df..b41d4a1 100644
--- a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
+++ b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
@@ -45,7 +45,7 @@ import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
 import org.apache.asterix.metadata.MetadataManager;
 import org.apache.asterix.metadata.MetadataTransactionContext;
 import org.apache.asterix.metadata.declared.MetadataProvider;
-import org.apache.asterix.runtime.util.AppContextInfo;
+import org.apache.asterix.runtime.utils.AppContextInfo;
 import org.apache.asterix.translator.IStatementExecutor;
 import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
 import org.apache.asterix.translator.IStatementExecutor.Stats;

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/3dcf57c4/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
----------------------------------------------------------------------
diff --git a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
index 671fff1..1ea8e7f 100644
--- a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
+++ b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
@@ -47,10 +47,10 @@ import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.exceptions.CompilationException;
 import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.common.utils.JobUtils;
 import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
 import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
 import org.apache.asterix.external.feed.management.ActiveLifecycleEventSubscriber;
-import org.apache.asterix.file.JobSpecificationUtils;
 import org.apache.asterix.lang.aql.parser.AQLParserFactory;
 import org.apache.asterix.lang.common.base.Expression;
 import org.apache.asterix.lang.common.base.Statement;
@@ -69,12 +69,12 @@ import org.apache.asterix.metadata.MetadataTransactionContext;
 import org.apache.asterix.metadata.declared.MetadataProvider;
 import org.apache.asterix.metadata.entities.Function;
 import org.apache.asterix.om.base.temporal.ADurationParserFactory;
-import org.apache.asterix.runtime.util.AppContextInfo;
-import org.apache.asterix.runtime.util.ClusterStateManager;
+import org.apache.asterix.runtime.utils.AppContextInfo;
+import org.apache.asterix.runtime.utils.ClusterStateManager;
+import org.apache.asterix.runtime.utils.RuntimeUtils;
 import org.apache.asterix.translator.IStatementExecutor;
 import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
 import org.apache.asterix.translator.IStatementExecutor.Stats;
-import org.apache.asterix.util.JobUtils;
 import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
 import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint;
 import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraintHelper;
@@ -186,7 +186,7 @@ public class CreateChannelStatement implements IExtensionStatement {
     public Pair<JobSpecification, AlgebricksAbsolutePartitionConstraint> buildChannelJobSpec(String
dataverse,
             String channelName, String duration, MetadataProvider metadataProvider, JobSpecification
channeljobSpec,
             String strIP, int port) throws Exception {
-        JobSpecification spec = JobSpecificationUtils.createJobSpecification();
+        JobSpecification spec = RuntimeUtils.createJobSpecification();
         IOperatorDescriptor channelQueryExecuter;
         AlgebricksPartitionConstraint executerPc;
 

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/3dcf57c4/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
----------------------------------------------------------------------
diff --git a/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
b/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
index 7222b1a..5ba303c 100644
--- a/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
+++ b/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
@@ -28,15 +28,16 @@ import org.apache.asterix.common.exceptions.ACIDException;
 import org.apache.asterix.metadata.MetadataManager;
 import org.apache.asterix.metadata.MetadataTransactionContext;
 import org.apache.asterix.metadata.api.ExtensionMetadataDataset;
-import org.apache.asterix.metadata.api.IMetadataEntity;
 import org.apache.asterix.metadata.api.IMetadataExtension;
 import org.apache.asterix.metadata.api.IMetadataIndex;
 import org.apache.asterix.metadata.bootstrap.MetadataBootstrap;
 import org.apache.asterix.metadata.entities.Datatype;
 import org.apache.asterix.metadata.entities.Dataverse;
 import org.apache.asterix.metadata.entitytupletranslators.MetadataTupleTranslatorProvider;
+import org.apache.asterix.metadata.utils.MetadataUtil;
 import org.apache.asterix.runtime.formats.NonTaggedDataFormat;
 import org.apache.hyracks.algebricks.common.utils.Pair;
+import org.apache.hyracks.api.application.INCApplicationContext;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class BADMetadataExtension implements IMetadataExtension {
@@ -44,7 +45,7 @@ public class BADMetadataExtension implements IMetadataExtension {
     public static final ExtensionId BAD_METADATA_EXTENSION_ID = new ExtensionId(
             BADConstants.BAD_METADATA_EXTENSION_NAME, 0);
     public static final Dataverse BAD_DATAVERSE = new Dataverse(BADConstants.BAD_DATAVERSE_NAME,
-            NonTaggedDataFormat.class.getName(), IMetadataEntity.PENDING_NO_OP);
+            NonTaggedDataFormat.class.getName(), MetadataUtil.PENDING_NO_OP);
 
     public static final Datatype BAD_SUBSCRIPTION_DATATYPE = new Datatype(BADConstants.BAD_DATAVERSE_NAME,
             BADConstants.ChannelSubscriptionsType, BADMetadataRecordTypes.channelSubscriptionsType,
false);
@@ -87,11 +88,12 @@ public class BADMetadataExtension implements IMetadataExtension {
     }
 
     @Override
-    public void initializeMetadata() throws HyracksDataException, RemoteException, ACIDException
{
+    public void initializeMetadata(INCApplicationContext appCtx)
+            throws HyracksDataException, RemoteException, ACIDException {
         // enlist datasets
-        MetadataBootstrap.enlistMetadataDataset(BADMetadataIndexes.CHANNEL_DATASET);
-        MetadataBootstrap.enlistMetadataDataset(BADMetadataIndexes.BROKER_DATASET);
-        MetadataBootstrap.enlistMetadataDataset(BADMetadataIndexes.PROCEDURE_DATASET);
+        MetadataBootstrap.enlistMetadataDataset(appCtx, BADMetadataIndexes.CHANNEL_DATASET);
+        MetadataBootstrap.enlistMetadataDataset(appCtx, BADMetadataIndexes.BROKER_DATASET);
+        MetadataBootstrap.enlistMetadataDataset(appCtx, BADMetadataIndexes.PROCEDURE_DATASET);
         if (MetadataBootstrap.isNewUniverse()) {
             MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
             try {

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/3dcf57c4/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
----------------------------------------------------------------------
diff --git a/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
b/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
index 631acf7..1c812a0 100644
--- a/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
+++ b/asterix-bad/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
@@ -35,7 +35,7 @@ import org.apache.asterix.bad.runtime.RepetitiveChannelOperatorDescriptor;
 import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
 import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
 import org.apache.asterix.external.feed.management.FeedConnectionId;
-import org.apache.asterix.runtime.util.AppContextInfo;
+import org.apache.asterix.runtime.utils.AppContextInfo;
 import org.apache.hyracks.api.client.IHyracksClientConnection;
 import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
 import org.apache.hyracks.api.dataflow.OperatorDescriptorId;


Mime
View raw message