clean up warnings in hivesterix codebase
git-svn-id: https://hyracks.googlecode.com/svn/branches/fullstack_staging@2671 123451ca-8445-de46-9d55-352943316053
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/HiveAlgebricksTranslator.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/HiveAlgebricksTranslator.java
index d8cc3fe..0485380 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/HiveAlgebricksTranslator.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/HiveAlgebricksTranslator.java
@@ -77,6 +77,7 @@
import edu.uci.ics.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor;
import edu.uci.ics.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter;
+@SuppressWarnings("rawtypes")
public class HiveAlgebricksTranslator implements Translator {
private int currentVariable = 0;
@@ -213,7 +214,7 @@
/**
* get the number of variables
- *
+ * s
* @return
*/
public int getVariableCounter() {
@@ -391,6 +392,7 @@
if (hiveOperator.getChildOperators() != null
&& hiveOperator.getChildOperators().size() > 0
&& continueTraverse) {
+ @SuppressWarnings("unchecked")
List<Operator> children = hiveOperator.getChildOperators();
if (currentOperatorRef == null)
currentOperatorRef = AlgebricksParentOperator;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/HiveLogicalPlanAndMetaData.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/HiveLogicalPlanAndMetaData.java
index b33e725..494e796 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/HiveLogicalPlanAndMetaData.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/HiveLogicalPlanAndMetaData.java
@@ -5,6 +5,7 @@
import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalPlanAndMetadata;
import edu.uci.ics.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
+@SuppressWarnings({ "rawtypes", "unchecked" })
public class HiveLogicalPlanAndMetaData implements ILogicalPlanAndMetadata {
IMetadataProvider metadata;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/GroupByVisitor.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/GroupByVisitor.java
index 2ab941a..d2180a3 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/GroupByVisitor.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/GroupByVisitor.java
@@ -44,6 +44,7 @@
import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.NestedTupleSourceOperator;
import edu.uci.ics.hyracks.algebricks.core.algebra.plan.ALogicalPlanImpl;
+@SuppressWarnings({ "rawtypes", "unchecked" })
public class GroupByVisitor extends DefaultVisitor {
private List<Mutable<ILogicalExpression>> AlgebricksAggs = new ArrayList<Mutable<ILogicalExpression>>();
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/JoinVisitor.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/JoinVisitor.java
index ddff42a..aea4be5 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/JoinVisitor.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/JoinVisitor.java
@@ -33,6 +33,7 @@
import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.LeftOuterJoinOperator;
import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.ProjectOperator;
+@SuppressWarnings("rawtypes")
public class JoinVisitor extends DefaultVisitor {
/**
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/LateralViewJoinVisitor.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/LateralViewJoinVisitor.java
index b829e67..004a8c2 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/LateralViewJoinVisitor.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/LateralViewJoinVisitor.java
@@ -53,6 +53,7 @@
* previous LVJ operator.
*/
+@SuppressWarnings("rawtypes")
public class LateralViewJoinVisitor extends DefaultVisitor {
private UDTFDesc udtf;
@@ -70,22 +71,15 @@
}
Operator parent0 = operator.getParentOperators().get(0);
- Operator parent1 = operator.getParentOperators().get(1);
- List<LogicalVariable> variables;
-
ILogicalOperator parentOperator;
ILogicalExpression unnestArg;
if (parent0 instanceof UDTFOperator) {
- variables = t
- .getVariablesFromSchema(t.generateInputSchema(parent1));
List<LogicalVariable> unnestVars = new ArrayList<LogicalVariable>();
VariableUtilities.getLiveVariables(parents.get(1).getValue(),
unnestVars);
unnestArg = new VariableReferenceExpression(unnestVars.get(0));
parentOperator = parents.get(1).getValue();
} else {
- variables = t
- .getVariablesFromSchema(t.generateInputSchema(parent0));
List<LogicalVariable> unnestVars = new ArrayList<LogicalVariable>();
VariableUtilities.getLiveVariables(parents.get(0).getValue(),
unnestVars);
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/MapJoinVisitor.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/MapJoinVisitor.java
index d0400a4..fa5d014 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/MapJoinVisitor.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/MapJoinVisitor.java
@@ -31,6 +31,7 @@
import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.InnerJoinOperator;
import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.ProjectOperator;
+@SuppressWarnings("rawtypes")
public class MapJoinVisitor extends DefaultVisitor {
/**
@@ -80,7 +81,6 @@
// get number of equality conjunctions in the final join condition
Set<Entry<Byte, List<ExprNodeDesc>>> keyEntries = keyMap.entrySet();
- List<List<ExprNodeDesc>> keyLists = new ArrayList<List<ExprNodeDesc>>();
Iterator<Entry<Byte, List<ExprNodeDesc>>> entry = keyEntries.iterator();
int size = 0;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/SortVisitor.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/SortVisitor.java
index fbded84..a2c0d03 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/SortVisitor.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/SortVisitor.java
@@ -26,6 +26,7 @@
public class SortVisitor extends DefaultVisitor {
+ @SuppressWarnings("rawtypes")
@Override
public Mutable<ILogicalOperator> visit(ReduceSinkOperator operator,
Mutable<ILogicalOperator> AlgebricksParentOperatorRef, Translator t)
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/base/Translator.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/base/Translator.java
index 7b2747e..9165386 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/base/Translator.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/logical/plan/visitor/base/Translator.java
@@ -17,6 +17,7 @@
import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalVariable;
import edu.uci.ics.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
+@SuppressWarnings("rawtypes")
public interface Translator {
/**
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/config/ConfUtil.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/config/ConfUtil.java
index 35d3b11..6b4d697 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/config/ConfUtil.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/config/ConfUtil.java
@@ -19,6 +19,7 @@
import edu.uci.ics.hyracks.api.client.NodeControllerInfo;
import edu.uci.ics.hyracks.api.topology.ClusterTopology;
+@SuppressWarnings({ "rawtypes", "deprecation" })
public class ConfUtil {
private static JobConf job;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/exec/HyracksExecutionEngine.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/exec/HyracksExecutionEngine.java
index 57213ba..2d8829c 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/exec/HyracksExecutionEngine.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/exec/HyracksExecutionEngine.java
@@ -68,6 +68,7 @@
import edu.uci.ics.hyracks.api.job.JobId;
import edu.uci.ics.hyracks.api.job.JobSpecification;
+@SuppressWarnings({ "rawtypes", "unchecked" })
public class HyracksExecutionEngine implements IExecutionEngine {
private static final Log LOG = LogFactory
@@ -370,7 +371,6 @@
ConditionalTask condition = (ConditionalTask) task;
List<Task<? extends Serializable>> branches = condition
.getListTasks();
- boolean existMR = false;
for (int i = branches.size() - 1; i >= 0; i--) {
Task branch = branches.get(i);
if (branch instanceof MapRedTask) {
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/jobgen/HiveScanRuntimeGenerator.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/jobgen/HiveScanRuntimeGenerator.java
index 27f01e2..9c8aee4 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/jobgen/HiveScanRuntimeGenerator.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/jobgen/HiveScanRuntimeGenerator.java
@@ -26,6 +26,7 @@
import edu.uci.ics.hyracks.dataflow.std.file.IFileSplitProvider;
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParserFactory;
+@SuppressWarnings({ "rawtypes", "deprecation" })
public class HiveScanRuntimeGenerator {
private PartitionDesc fileDesc;
@@ -97,7 +98,6 @@
opDesc, opDesc.getPartitionConstraint());
}
- @SuppressWarnings("unchecked")
private static RecordDescriptor mkRecordDescriptor(
IOperatorSchema opSchema, Object[] types, JobGenContext context)
throws AlgebricksException {
@@ -105,8 +105,8 @@
.getSize()];
ISerializerDeserializerProvider sdp = context
.getSerializerDeserializerProvider();
- int i = 0;
- for (LogicalVariable var : opSchema) {
+ int size = opSchema.getSize();
+ for (int i = 0; i < size; i++) {
Object t = types[i];
fields[i] = sdp.getSerializerDeserializer(t);
i++;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/jobgen/HiveWriteRuntimeGenerator.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/jobgen/HiveWriteRuntimeGenerator.java
index 40428c8..d372868 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/jobgen/HiveWriteRuntimeGenerator.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/jobgen/HiveWriteRuntimeGenerator.java
@@ -11,6 +11,7 @@
import edu.uci.ics.hyracks.algebricks.runtime.base.IPushRuntimeFactory;
import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
+@SuppressWarnings("deprecation")
public class HiveWriteRuntimeGenerator {
private FileSinkOperator fileSink;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/AbstractHiveFileSplitProvider.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/AbstractHiveFileSplitProvider.java
index 598238e..2f988f8 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/AbstractHiveFileSplitProvider.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/AbstractHiveFileSplitProvider.java
@@ -5,6 +5,7 @@
public abstract class AbstractHiveFileSplitProvider implements
IFileSplitProvider {
+ private static final long serialVersionUID = 1L;
@Override
public FileSplit[] getFileSplits() {
@@ -12,6 +13,7 @@
return null;
}
+ @SuppressWarnings("deprecation")
public abstract org.apache.hadoop.mapred.FileSplit[] getFileSplitArray();
}
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/AbstractHiveTupleParser.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/AbstractHiveTupleParser.java
index bec9034..a8addeb 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/AbstractHiveTupleParser.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/AbstractHiveTupleParser.java
@@ -8,6 +8,7 @@
import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParser;
+@SuppressWarnings("deprecation")
public abstract class AbstractHiveTupleParser implements ITupleParser {
@Override
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveFileScanOperatorDescriptor.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveFileScanOperatorDescriptor.java
index 9c8b293..d248486 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveFileScanOperatorDescriptor.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveFileScanOperatorDescriptor.java
@@ -39,6 +39,7 @@
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParser;
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParserFactory;
+@SuppressWarnings("deprecation")
public class HiveFileScanOperatorDescriptor extends
AbstractSingleActivityOperatorDescriptor {
private static final long serialVersionUID = 1L;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveFileSplitProvider.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveFileSplitProvider.java
index 177fc7a..d92d353 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveFileSplitProvider.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveFileSplitProvider.java
@@ -15,18 +15,18 @@
import org.apache.hadoop.mapred.JobConf;
import org.eclipse.jetty.util.log.Log;
+@SuppressWarnings({ "deprecation", "rawtypes" })
public class HiveFileSplitProvider extends AbstractHiveFileSplitProvider {
+ private static final long serialVersionUID = 1L;
private transient InputFormat format;
private transient JobConf conf;
private String confContent;
final private int nPartition;
private transient FileSplit[] splits;
- private String inputFormatStr;
public HiveFileSplitProvider(JobConf conf, String filePath, int nPartition) {
format = conf.getInputFormat();
- inputFormatStr = format.getClass().getName();
this.conf = conf;
this.nPartition = nPartition;
writeConfContent();
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveTupleParser.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveTupleParser.java
index 6c40b95..12222b4 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveTupleParser.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveTupleParser.java
@@ -33,6 +33,7 @@
import edu.uci.ics.hyracks.dataflow.common.comm.io.FrameTupleAppender;
import edu.uci.ics.hyracks.dataflow.common.comm.util.FrameUtils;
+@SuppressWarnings({ "rawtypes", "deprecation", "unchecked" })
public class HiveTupleParser extends AbstractHiveTupleParser {
private int[] outputColumnsOffset;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveTupleParserFactory.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveTupleParserFactory.java
index 6a8802c..69aa881 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveTupleParserFactory.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/HiveTupleParserFactory.java
@@ -18,6 +18,7 @@
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParser;
import edu.uci.ics.hyracks.dataflow.std.file.ITupleParserFactory;
+@SuppressWarnings("deprecation")
public class HiveTupleParserFactory implements ITupleParserFactory {
private static final long serialVersionUID = 1L;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/Partition.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/Partition.java
index c23c3f9..1b3dcf2 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/Partition.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filescan/Partition.java
@@ -6,7 +6,9 @@
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapred.FileSplit;
+@SuppressWarnings("deprecation")
public class Partition implements Serializable {
+ private static final long serialVersionUID = 1L;
private String uri;
private long offset;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filewrite/HiveFileWritePushRuntime.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filewrite/HiveFileWritePushRuntime.java
index dcb3920..05e79ea 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filewrite/HiveFileWritePushRuntime.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filewrite/HiveFileWritePushRuntime.java
@@ -21,6 +21,7 @@
import edu.uci.ics.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
import edu.uci.ics.hyracks.dataflow.common.data.accessors.FrameTupleReference;
+@SuppressWarnings("deprecation")
public class HiveFileWritePushRuntime implements IPushRuntime {
/**
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filewrite/HivePushRuntimeFactory.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filewrite/HivePushRuntimeFactory.java
index 47c8472..43e90fa 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filewrite/HivePushRuntimeFactory.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/operator/filewrite/HivePushRuntimeFactory.java
@@ -21,6 +21,7 @@
import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
+@SuppressWarnings("deprecation")
public class HivePushRuntimeFactory implements IPushRuntimeFactory {
private static final long serialVersionUID = 1L;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/provider/HiveSerializerDeserializerProvider.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/provider/HiveSerializerDeserializerProvider.java
index ea521a6..7938de8 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/provider/HiveSerializerDeserializerProvider.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/provider/HiveSerializerDeserializerProvider.java
@@ -12,10 +12,10 @@
private HiveSerializerDeserializerProvider() {
}
+ @SuppressWarnings("rawtypes")
@Override
public ISerializerDeserializer getSerializerDeserializer(Object type)
throws AlgebricksException {
- // TODO Auto-generated method stub
// return ARecordSerializerDeserializer.SCHEMALESS_INSTANCE;
return null;
}
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/provider/HiveTypeTraitProvider.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/provider/HiveTypeTraitProvider.java
index 4513dbd..2059128 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/provider/HiveTypeTraitProvider.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/runtime/provider/HiveTypeTraitProvider.java
@@ -6,7 +6,7 @@
import edu.uci.ics.hyracks.api.dataflow.value.ITypeTraits;
public class HiveTypeTraitProvider implements ITypeTraitProvider, Serializable {
-
+ private static final long serialVersionUID = 1L;
public static HiveTypeTraitProvider INSTANCE = new HiveTypeTraitProvider();
private HiveTypeTraitProvider() {
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyArray.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyArray.java
index d36d96d..821c03d 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyArray.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyArray.java
@@ -74,6 +74,7 @@
* The elements of the array. Note that we call arrayElements[i].init(bytes,
* begin, length) only when that element is accessed.
*/
+ @SuppressWarnings("rawtypes")
LazyObject[] arrayElements;
/**
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyColumnar.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyColumnar.java
index e538c71..a25ae49 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyColumnar.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyColumnar.java
@@ -21,8 +21,6 @@
import java.util.Arrays;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hive.serde2.objectinspector.StructField;
import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
@@ -36,10 +34,9 @@
* LazyStruct does not deal with the case of a NULL struct. That is handled by
* the parent LazyObject.
*/
+@SuppressWarnings("rawtypes")
public class LazyColumnar extends LazyNonPrimitive<LazyColumnarObjectInspector> {
- private static Log LOG = LogFactory.getLog(LazyColumnar.class.getName());
-
/**
* IFrameTupleReference: the backend of the struct
*/
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyFactory.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyFactory.java
index 54487b9..e7593e4 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyFactory.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyFactory.java
@@ -86,9 +86,9 @@
return new LazyStruct((LazyStructObjectInspector) oi);
else
return new LazyColumnar((LazyColumnarObjectInspector) oi);
+ default:
+ throw new RuntimeException("Hive LazySerDe Internal error.");
}
-
- throw new RuntimeException("Hive LazySerDe Internal error.");
}
private LazyFactory() {
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyMap.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyMap.java
index a7f930f..56bc41b 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyMap.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyMap.java
@@ -46,6 +46,7 @@
*
*/
+@SuppressWarnings("rawtypes")
public class LazyMap extends LazyNonPrimitive<LazyMapObjectInspector> {
private static Log LOG = LogFactory.getLog(LazyMap.class.getName());
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazySerDe.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazySerDe.java
index e239c2d..4d0dff6 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazySerDe.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazySerDe.java
@@ -133,6 +133,7 @@
/**
* Deserialize a table record to a Lazy struct.
*/
+ @SuppressWarnings("deprecation")
@Override
public Object deserialize(Writable field) throws SerDeException {
if (byteArrayRef == null) {
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyStruct.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyStruct.java
index a6cf404..61cc335 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyStruct.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyStruct.java
@@ -53,6 +53,7 @@
/**
* The fields of the struct.
*/
+ @SuppressWarnings("rawtypes")
LazyObject[] fields;
/**
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyUtils.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyUtils.java
index d8c40f7..2d0406c 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyUtils.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/LazyUtils.java
@@ -25,8 +25,6 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hive.serde2.ByteStream.Output;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
@@ -48,8 +46,6 @@
*/
public final class LazyUtils {
- private static Log LOG = LogFactory.getLog(LazyUtils.class.getName());
-
/**
* Convert the byte array to an int starting from the given offset. Refer to
* code by aeden on DZone Snippets:
@@ -256,6 +252,8 @@
* A zero-compressed encoded integer.
*/
public static class VInt implements Serializable {
+ private static final long serialVersionUID = 1L;
+
public VInt() {
value = 0;
length = 0;
diff --git a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/objectinspector/primitive/AbstractPrimitiveLazyObjectInspector.java b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/objectinspector/primitive/AbstractPrimitiveLazyObjectInspector.java
index 6855895..7ef8bdd 100644
--- a/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/objectinspector/primitive/AbstractPrimitiveLazyObjectInspector.java
+++ b/hivesterix/src/main/java/edu/uci/ics/hivesterix/serde/lazy/objectinspector/primitive/AbstractPrimitiveLazyObjectInspector.java
@@ -33,6 +33,7 @@
super(typeEntry);
}
+ @SuppressWarnings("unchecked")
@Override
public T getPrimitiveWritableObject(Object o) {
if (o == null)
diff --git a/hivesterix/src/main/java/org/apache/hadoop/hive/ql/Driver.java b/hivesterix/src/main/java/org/apache/hadoop/hive/ql/Driver.java
index 2bfb797..57e2cc0 100644
--- a/hivesterix/src/main/java/org/apache/hadoop/hive/ql/Driver.java
+++ b/hivesterix/src/main/java/org/apache/hadoop/hive/ql/Driver.java
@@ -113,6 +113,7 @@
import edu.uci.ics.hivesterix.runtime.exec.HyracksExecutionEngine;
import edu.uci.ics.hivesterix.runtime.exec.IExecutionEngine;
+@SuppressWarnings({ "deprecation", "unused" })
public class Driver implements CommandProcessor {
static final private Log LOG = LogFactory.getLog(Driver.class.getName());
@@ -121,7 +122,6 @@
// hive-sterix
private IExecutionEngine engine;
private boolean hivesterix = false;
- private PrintWriter planPrinter;
private int maxRows = 100;
ByteStream.Output bos = new ByteStream.Output();
@@ -343,7 +343,6 @@
public Driver(HiveConf conf, PrintWriter planPrinter) {
this.conf = conf;
engine = new HyracksExecutionEngine(conf, planPrinter);
- this.planPrinter = planPrinter;
}
public void clear() {
diff --git a/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCount.java b/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCount.java
index c2758bc..4160d5b 100644
--- a/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCount.java
+++ b/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCount.java
@@ -20,8 +20,6 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
import org.apache.hadoop.hive.ql.metadata.HiveException;
@@ -48,9 +46,6 @@
+ "which the supplied expression(s) are unique and non-NULL.")
public class GenericUDAFCount implements GenericUDAFResolver2 {
- private static final Log LOG = LogFactory.getLog(GenericUDAFCount.class
- .getName());
-
@Override
public GenericUDAFEvaluator getEvaluator(TypeInfo[] parameters)
throws SemanticException {
diff --git a/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java b/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java
index b844a22..11d9dc3 100644
--- a/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java
+++ b/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFCovariance.java
@@ -274,8 +274,6 @@
myagg.covar = 0;
}
- private boolean warned = false;
-
@Override
public void iterate(AggregationBuffer agg, Object[] parameters)
throws HiveException {
diff --git a/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java b/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java
index 9dd370a..4c16f5a 100644
--- a/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java
+++ b/hivesterix/src/main/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFVariance.java
@@ -117,7 +117,6 @@
private StructField varianceField;
private LongObjectInspector countFieldOI;
private DoubleObjectInspector sumFieldOI;
- private DoubleObjectInspector varianceFieldOI;
// For PARTIAL1 and PARTIAL2
private Object[] partialResult;
@@ -145,8 +144,6 @@
.getFieldObjectInspector();
sumFieldOI = (DoubleObjectInspector) sumField
.getFieldObjectInspector();
- varianceFieldOI = (DoubleObjectInspector) varianceField
- .getFieldObjectInspector();
}
// init output
diff --git a/hivesterix/src/test/java/edu/uci/ics/hivesterix/perf/base/AbstractPerfTestSuiteClass.java b/hivesterix/src/test/java/edu/uci/ics/hivesterix/perf/base/AbstractPerfTestSuiteClass.java
index 3f6d560..05474ca 100644
--- a/hivesterix/src/test/java/edu/uci/ics/hivesterix/perf/base/AbstractPerfTestSuiteClass.java
+++ b/hivesterix/src/test/java/edu/uci/ics/hivesterix/perf/base/AbstractPerfTestSuiteClass.java
@@ -29,12 +29,11 @@
import edu.uci.ics.hyracks.control.common.controllers.NCConfig;
import edu.uci.ics.hyracks.control.nc.NodeControllerService;
+@SuppressWarnings("deprecation")
public abstract class AbstractPerfTestSuiteClass extends TestSuite {
private static final String PATH_TO_HADOOP_CONF = "src/test/resources/perf/hadoop/conf";
private static final String PATH_TO_HIVE_CONF = "src/test/resources/perf/hive/conf/hive-default.xml";
-
- private static final String PATH_TO_CLUSTER_CONF = "src/test/resources/perf/conf/cluster";
private static final String PATH_TO_DATA = "src/test/resources/perf/data/";
private MiniDFSCluster dfsCluster;
diff --git a/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/base/AbstractTestSuiteClass.java b/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/base/AbstractTestSuiteClass.java
index 7742adb..3c30254 100644
--- a/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/base/AbstractTestSuiteClass.java
+++ b/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/base/AbstractTestSuiteClass.java
@@ -30,6 +30,7 @@
import edu.uci.ics.hyracks.control.common.controllers.NCConfig;
import edu.uci.ics.hyracks.control.nc.NodeControllerService;
+@SuppressWarnings("deprecation")
public abstract class AbstractTestSuiteClass extends TestSuite {
private static final String PATH_TO_HADOOP_CONF = "src/test/resources/runtimefunctionts/hadoop/conf";
diff --git a/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/datagen/RecordBalance.java b/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/datagen/RecordBalance.java
index 9241dc5..800d6be 100644
--- a/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/datagen/RecordBalance.java
+++ b/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/datagen/RecordBalance.java
@@ -18,6 +18,7 @@
import org.apache.hadoop.mapred.Reporter;
import org.apache.hadoop.mapred.TextInputFormat;
+@SuppressWarnings("deprecation")
public class RecordBalance {
private static String confPath = System.getenv("HADDOP_HOME");
diff --git a/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/optimizer/OptimizerTestSuiteCaseGenerator.java b/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/optimizer/OptimizerTestSuiteCaseGenerator.java
index 35710e2..a86dc29 100644
--- a/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/optimizer/OptimizerTestSuiteCaseGenerator.java
+++ b/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/optimizer/OptimizerTestSuiteCaseGenerator.java
@@ -13,7 +13,6 @@
public class OptimizerTestSuiteCaseGenerator extends AbstractHivesterixTestCase {
private File resultFile;
- private static final String PATH_TO_HIVE_CONF = "src/test/resources/runtimefunctionts/hive/conf/hive-default.xml";
OptimizerTestSuiteCaseGenerator(File queryFile, File resultFile) {
super("testOptimizer", queryFile);
diff --git a/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/serde/SerDeTest.java b/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/serde/SerDeTest.java
index b3aedc6..b5db432 100644
--- a/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/serde/SerDeTest.java
+++ b/hivesterix/src/test/java/edu/uci/ics/hivesterix/test/serde/SerDeTest.java
@@ -45,6 +45,7 @@
* TestLazySimpleSerDe.
*
*/
+@SuppressWarnings({ "deprecation", "rawtypes" })
public class SerDeTest extends TestCase {
/**
@@ -62,8 +63,6 @@
outputSerde.initialize(conf, tbl);
// Data
- Text t = new Text(
- "123\t456\t789\t1000\t5.3\thive and hadoop\t1.\tNULL");
String s = "123\t456\t789\t1000\t5.3\thive and hadoop\t1\tqf";
byte[] bytes = s.getBytes();