ASTERIXDB-54: s/IHyracksCommonContext/IHyracksTaskContext/
Change-Id: Id98f3d94e8036199dcbdbdb059c97c0f99ed9205
Reviewed-on: https://asterix-gerrit.ics.uci.edu/534
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <hubailmor@gmail.com>
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/parse/ITupleForwardPolicy.java b/asterix-common/src/main/java/org/apache/asterix/common/parse/ITupleForwardPolicy.java
index 4ed5c66..df5a983 100644
--- a/asterix-common/src/main/java/org/apache/asterix/common/parse/ITupleForwardPolicy.java
+++ b/asterix-common/src/main/java/org/apache/asterix/common/parse/ITupleForwardPolicy.java
@@ -21,7 +21,7 @@
import java.util.Map;
import org.apache.hyracks.api.comm.IFrameWriter;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
@@ -37,7 +37,7 @@
public void configure(Map<String, String> configuration);
- public void initialize(IHyracksTaskContext ctx, IFrameWriter frameWriter) throws HyracksDataException;
+ public void initialize(IHyracksCommonContext ctx, IFrameWriter frameWriter) throws HyracksDataException;
public TupleForwardPolicyType getType();
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/AbstractIndexingTupleParser.java b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/AbstractIndexingTupleParser.java
index eb88b30..07e09bd 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/AbstractIndexingTupleParser.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/AbstractIndexingTupleParser.java
@@ -29,7 +29,7 @@
import org.apache.asterix.om.types.BuiltinType;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
@@ -42,7 +42,7 @@
protected DataOutput dos;
protected final FrameTupleAppender appender;
protected final ARecordType recType;
- protected final IHyracksTaskContext ctx;
+ protected final IHyracksCommonContext ctx;
protected final IAsterixHDFSRecordParser deserializer;
protected final AMutableInt32 aMutableInt = new AMutableInt32(0);
protected final AMutableInt64 aMutableLong = new AMutableInt64(0);
@@ -52,7 +52,8 @@
@SuppressWarnings("rawtypes")
protected final ISerializerDeserializer longSerde = AqlSerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AINT64);
- public AbstractIndexingTupleParser(IHyracksTaskContext ctx, ARecordType recType, IAsterixHDFSRecordParser deserializer) throws HyracksDataException {
+ public AbstractIndexingTupleParser(IHyracksCommonContext ctx, ARecordType recType, IAsterixHDFSRecordParser
+ deserializer) throws HyracksDataException {
appender = new FrameTupleAppender(new VSizeFrame(ctx));
this.recType = recType;
this.ctx = ctx;
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/AdmOrDelimitedIndexingTupleParser.java b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/AdmOrDelimitedIndexingTupleParser.java
index 6ec4c8a..6abcbb8 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/AdmOrDelimitedIndexingTupleParser.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/AdmOrDelimitedIndexingTupleParser.java
@@ -30,7 +30,7 @@
import org.apache.asterix.runtime.operators.file.IDataParser;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
@@ -53,7 +53,7 @@
private ISerializerDeserializer longSerde = AqlSerializerDeserializerProvider.INSTANCE
.getSerializerDeserializer(BuiltinType.AINT64);
- public AdmOrDelimitedIndexingTupleParser(IHyracksTaskContext ctx, ARecordType recType, IDataParser parser)
+ public AdmOrDelimitedIndexingTupleParser(IHyracksCommonContext ctx, ARecordType recType, IDataParser parser)
throws HyracksDataException {
this.parser = parser;
this.recType = recType;
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSIndexingParserFactory.java b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSIndexingParserFactory.java
index 136df05..b38b835 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSIndexingParserFactory.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSIndexingParserFactory.java
@@ -27,7 +27,7 @@
import org.apache.asterix.runtime.operators.file.AsterixTupleParserFactory;
import org.apache.asterix.runtime.operators.file.DelimitedDataParser;
import org.apache.hadoop.mapred.JobConf;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.std.file.ITupleParser;
import org.apache.hyracks.dataflow.std.file.ITupleParserFactory;
@@ -66,7 +66,7 @@
}
@Override
- public ITupleParser createTupleParser(IHyracksTaskContext ctx) throws HyracksDataException {
+ public ITupleParser createTupleParser(IHyracksCommonContext ctx) throws HyracksDataException {
if (format == null) {
throw new IllegalArgumentException("Unspecified data format");
}
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSObjectTupleParser.java b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSObjectTupleParser.java
index fb739e4..f42a6d1 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSObjectTupleParser.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSObjectTupleParser.java
@@ -25,7 +25,7 @@
import org.apache.asterix.om.types.ARecordType;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
@@ -40,7 +40,8 @@
private final FrameTupleAppender appender;
private IAsterixHDFSRecordParser deserializer;
- public HDFSObjectTupleParser(IHyracksTaskContext ctx, ARecordType recType, IAsterixHDFSRecordParser deserializer) throws HyracksDataException {
+ public HDFSObjectTupleParser(IHyracksCommonContext ctx, ARecordType recType, IAsterixHDFSRecordParser deserializer)
+ throws HyracksDataException {
appender = new FrameTupleAppender(new VSizeFrame(ctx));
this.deserializer = deserializer;
tb = new ArrayTupleBuilder(1);
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSObjectTupleParserFactory.java b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSObjectTupleParserFactory.java
index b448749..ac3a92f 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSObjectTupleParserFactory.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/HDFSObjectTupleParserFactory.java
@@ -22,7 +22,7 @@
import org.apache.asterix.external.adapter.factory.HDFSAdapterFactory;
import org.apache.asterix.om.types.ARecordType;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.std.file.ITupleParser;
import org.apache.hyracks.dataflow.std.file.ITupleParserFactory;
@@ -46,7 +46,7 @@
}
@Override
- public ITupleParser createTupleParser(IHyracksTaskContext ctx) throws HyracksDataException {
+ public ITupleParser createTupleParser(IHyracksCommonContext ctx) throws HyracksDataException {
IAsterixHDFSRecordParser objectParser;
if (parserClassName.equals(HDFSAdapterFactory.PARSER_HIVE)) {
objectParser = new HiveObjectParser();
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/RCFileIndexingTupleParser.java b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/RCFileIndexingTupleParser.java
index 79cbe74..eaa3381 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/RCFileIndexingTupleParser.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/RCFileIndexingTupleParser.java
@@ -20,7 +20,7 @@
import org.apache.asterix.external.indexing.input.AbstractHDFSReader;
import org.apache.asterix.om.types.ARecordType;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
@@ -30,7 +30,8 @@
private Integer lastFileNumber = -1;
private long lastByteLocation = -1;
- public RCFileIndexingTupleParser(IHyracksTaskContext ctx, ARecordType recType, IAsterixHDFSRecordParser deserializer)
+ public RCFileIndexingTupleParser(IHyracksCommonContext ctx, ARecordType recType, IAsterixHDFSRecordParser
+ deserializer)
throws HyracksDataException {
super(ctx, recType, deserializer);
tb = new ArrayTupleBuilder(4);
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/TextOrSeqIndexingTupleParser.java b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/TextOrSeqIndexingTupleParser.java
index a48b4b6..d44b3f3 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/TextOrSeqIndexingTupleParser.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/dataflow/TextOrSeqIndexingTupleParser.java
@@ -20,12 +20,12 @@
import org.apache.asterix.external.indexing.input.AbstractHDFSReader;
import org.apache.asterix.om.types.ARecordType;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
public class TextOrSeqIndexingTupleParser extends AbstractIndexingTupleParser{
- public TextOrSeqIndexingTupleParser(IHyracksTaskContext ctx,
+ public TextOrSeqIndexingTupleParser(IHyracksCommonContext ctx,
ARecordType recType, IAsterixHDFSRecordParser deserializer)
throws HyracksDataException {
super(ctx, recType, deserializer);
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractTupleParser.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractTupleParser.java
index 9d23e5b..f3199e9 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractTupleParser.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractTupleParser.java
@@ -27,7 +27,7 @@
import org.apache.asterix.common.parse.ITupleForwardPolicy;
import org.apache.asterix.om.types.ARecordType;
import org.apache.hyracks.api.comm.IFrameWriter;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.std.file.ITupleParser;
@@ -44,9 +44,9 @@
protected ArrayTupleBuilder tb = new ArrayTupleBuilder(1);
protected DataOutput dos = tb.getDataOutput();
protected final ARecordType recType;
- protected final IHyracksTaskContext ctx;
+ protected final IHyracksCommonContext ctx;
- public AbstractTupleParser(IHyracksTaskContext ctx, ARecordType recType) throws HyracksDataException {
+ public AbstractTupleParser(IHyracksCommonContext ctx, ARecordType recType) throws HyracksDataException {
this.recType = recType;
this.ctx = ctx;
}
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AsterixTupleParserFactory.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AsterixTupleParserFactory.java
index ac33540..2053a75 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AsterixTupleParserFactory.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AsterixTupleParserFactory.java
@@ -31,7 +31,7 @@
import org.apache.asterix.om.types.AUnionType;
import org.apache.asterix.om.types.IAType;
import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.data.parsers.DoubleParserFactory;
import org.apache.hyracks.dataflow.common.data.parsers.FloatParserFactory;
@@ -93,7 +93,7 @@
}
@Override
- public ITupleParser createTupleParser(IHyracksTaskContext ctx) throws HyracksDataException {
+ public ITupleParser createTupleParser(IHyracksCommonContext ctx) throws HyracksDataException {
ITupleParser tupleParser = null;
try {
String parserFactoryClassname = (String) configuration.get(KEY_PARSER_FACTORY);
@@ -120,7 +120,7 @@
private final ITupleForwardPolicy policy;
- public GenericTupleParser(IHyracksTaskContext ctx, ARecordType recType, IDataParser dataParser,
+ public GenericTupleParser(IHyracksCommonContext ctx, ARecordType recType, IDataParser dataParser,
ITupleForwardPolicy policy) throws HyracksDataException {
super(ctx, recType);
this.dataParser = dataParser;
@@ -139,7 +139,7 @@
}
- private IDataParser createDataParser(IHyracksTaskContext ctx) throws Exception {
+ private IDataParser createDataParser(IHyracksCommonContext ctx) throws Exception {
IDataParser dataParser = null;
switch (inputDataFormat) {
case ADM:
@@ -189,7 +189,7 @@
return policy;
}
- private IDataParser configureDelimitedDataParser(IHyracksTaskContext ctx) throws AsterixException {
+ private IDataParser configureDelimitedDataParser(IHyracksCommonContext ctx) throws AsterixException {
IValueParserFactory[] valueParserFactories = getValueParserFactories();
Character delimiter = getDelimiter(configuration);
char quote = getQuote(configuration, delimiter);
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/CounterTimerTupleForwardPolicy.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/CounterTimerTupleForwardPolicy.java
index d9a7982..c06caef 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/CounterTimerTupleForwardPolicy.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/CounterTimerTupleForwardPolicy.java
@@ -28,7 +28,7 @@
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
@@ -67,7 +67,7 @@
}
}
- public void initialize(IHyracksTaskContext ctx, IFrameWriter writer) throws HyracksDataException {
+ public void initialize(IHyracksCommonContext ctx, IFrameWriter writer) throws HyracksDataException {
this.appender = new FrameTupleAppender();
this.frame = new VSizeFrame(ctx);
appender.reset(frame, true);
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/FrameFullTupleForwardPolicy.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/FrameFullTupleForwardPolicy.java
index 6eba0a9..e22180c 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/FrameFullTupleForwardPolicy.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/FrameFullTupleForwardPolicy.java
@@ -24,7 +24,7 @@
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
@@ -40,7 +40,7 @@
// no-op
}
- public void initialize(IHyracksTaskContext ctx, IFrameWriter writer)
+ public void initialize(IHyracksCommonContext ctx, IFrameWriter writer)
throws HyracksDataException {
this.appender = new FrameTupleAppender();
this.frame = new VSizeFrame(ctx);
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/RateControlledTupleForwardPolicy.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/RateControlledTupleForwardPolicy.java
index d8e9fbb..c5af720 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/RateControlledTupleForwardPolicy.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/RateControlledTupleForwardPolicy.java
@@ -24,7 +24,7 @@
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.context.IHyracksCommonContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
@@ -48,7 +48,7 @@
delayConfigured = interTupleInterval != 0;
}
- public void initialize(IHyracksTaskContext ctx, IFrameWriter writer) throws HyracksDataException {
+ public void initialize(IHyracksCommonContext ctx, IFrameWriter writer) throws HyracksDataException {
this.appender = new FrameTupleAppender();
this.frame = new VSizeFrame(ctx);
this.writer = writer;