asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [2/4] incubator-asterixdb git commit: Clean up compilation warnings.
Date Sat, 21 Nov 2015 21:21:23 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedIntakeOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedIntakeOperatorNodePushable.java b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedIntakeOperatorNodePushable.java
index 425c299..ba5aac7 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedIntakeOperatorNodePushable.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedIntakeOperatorNodePushable.java
@@ -59,7 +59,6 @@ public class FeedIntakeOperatorNodePushable extends AbstractUnaryOutputSourceOpe
     private final IFeedManager feedManager;
     private final IHyracksTaskContext ctx;
     private final IFeedAdapterFactory adapterFactory;
-    private final FeedPolicyAccessor policyAccessor;
 
     private IngestionRuntime ingestionRuntime;
     private IFeedAdapter adapter;
@@ -77,7 +76,6 @@ public class FeedIntakeOperatorNodePushable extends AbstractUnaryOutputSourceOpe
                 .getApplicationContext().getApplicationObject();
         this.feedSubscriptionManager = runtimeCtx.getFeedManager().getFeedSubscriptionManager();
         this.feedManager = runtimeCtx.getFeedManager();
-        this.policyAccessor = policyAccessor;
     }
 
     @Override
@@ -96,8 +94,8 @@ public class FeedIntakeOperatorNodePushable extends AbstractUnaryOutputSourceOpe
                     throw new HyracksDataException(e);
                 }
                 FrameTupleAccessor fta = new FrameTupleAccessor(recordDesc);
-                feedFrameWriter = new DistributeFeedFrameWriter(ctx, feedId, writer, FeedRuntimeType.INTAKE, partition, fta,
-                        feedManager);
+                feedFrameWriter = new DistributeFeedFrameWriter(ctx, feedId, writer, FeedRuntimeType.INTAKE, partition,
+                        fta, feedManager);
                 adapterRuntimeManager = new AdapterRuntimeManager(feedId, adapter, tracker, feedFrameWriter, partition);
                 SubscribableFeedRuntimeId runtimeId = new SubscribableFeedRuntimeId(feedId, FeedRuntimeType.INTAKE,
                         partition);
@@ -115,7 +113,7 @@ public class FeedIntakeOperatorNodePushable extends AbstractUnaryOutputSourceOpe
                         LOGGER.info(" Adaptor " + adapter.getClass().getName() + "[" + partition + "]"
                                 + " connected to backend for feed " + feedId);
                     }
-                    feedFrameWriter = (DistributeFeedFrameWriter) ingestionRuntime.getFeedFrameWriter();
+                    feedFrameWriter = ingestionRuntime.getFeedFrameWriter();
                 } else {
                     String message = "Feed Ingestion Runtime for feed " + feedId
                             + " is already registered and is active!.";
@@ -125,17 +123,17 @@ public class FeedIntakeOperatorNodePushable extends AbstractUnaryOutputSourceOpe
             }
 
             waitTillIngestionIsOver(adapterRuntimeManager);
-            feedSubscriptionManager.deregisterFeedSubscribableRuntime((SubscribableFeedRuntimeId) ingestionRuntime
-                    .getRuntimeId());
+            feedSubscriptionManager
+                    .deregisterFeedSubscribableRuntime((SubscribableFeedRuntimeId) ingestionRuntime.getRuntimeId());
             if (adapterRuntimeManager.getState().equals(IAdapterRuntimeManager.State.FAILED_INGESTION)) {
                 throw new HyracksDataException("Unable to ingest data");
             }
 
         } catch (InterruptedException ie) {
             /*
-             * An Interrupted Exception is thrown if the Intake job cannot progress further due to failure of another node involved in the Hyracks job.  
+             * An Interrupted Exception is thrown if the Intake job cannot progress further due to failure of another node involved in the Hyracks job.
              * As the Intake job involves only the intake operator, the exception is indicative of a failure at the sibling intake operator location.
-             * The surviving intake partitions must continue to live and receive data from the external source. 
+             * The surviving intake partitions must continue to live and receive data from the external source.
              */
             List<ISubscriberRuntime> subscribers = ingestionRuntime.getSubscribers();
             FeedPolicyAccessor policyAccessor = new FeedPolicyAccessor(new HashMap<String, String>());
@@ -155,7 +153,8 @@ public class FeedIntakeOperatorNodePushable extends AbstractUnaryOutputSourceOpe
                     ingestionRuntime.unsubscribeFeed((CollectionRuntime) failingSubscriber);
                 } catch (Exception e) {
                     if (LOGGER.isLoggable(Level.WARNING)) {
-                        LOGGER.warning("Excpetion in unsubscribing " + failingSubscriber + " message " + e.getMessage());
+                        LOGGER.warning(
+                                "Excpetion in unsubscribing " + failingSubscriber + " message " + e.getMessage());
                     }
                 }
             }
@@ -167,10 +166,11 @@ public class FeedIntakeOperatorNodePushable extends AbstractUnaryOutputSourceOpe
                 }
             } else {
                 if (LOGGER.isLoggable(Level.INFO)) {
-                    LOGGER.info("Interrupted Exception. None of the subscribers need to handle failures. Shutting down feed ingestion");
+                    LOGGER.info(
+                            "Interrupted Exception. None of the subscribers need to handle failures. Shutting down feed ingestion");
                 }
-                feedSubscriptionManager.deregisterFeedSubscribableRuntime((SubscribableFeedRuntimeId) ingestionRuntime
-                        .getRuntimeId());
+                feedSubscriptionManager
+                        .deregisterFeedSubscribableRuntime((SubscribableFeedRuntimeId) ingestionRuntime.getRuntimeId());
                 throw new HyracksDataException(ie);
             }
         } catch (Exception e) {
@@ -199,8 +199,8 @@ public class FeedIntakeOperatorNodePushable extends AbstractUnaryOutputSourceOpe
             LOGGER.info("Waiting for adaptor [" + partition + "]" + "to be done with ingestion of feed " + feedId);
         }
         synchronized (adapterRuntimeManager) {
-            while (!(adapterRuntimeManager.getState().equals(IAdapterRuntimeManager.State.FINISHED_INGESTION) || (adapterRuntimeManager
-                    .getState().equals(IAdapterRuntimeManager.State.FAILED_INGESTION)))) {
+            while (!(adapterRuntimeManager.getState().equals(IAdapterRuntimeManager.State.FINISHED_INGESTION)
+                    || (adapterRuntimeManager.getState().equals(IAdapterRuntimeManager.State.FAILED_INGESTION)))) {
                 adapterRuntimeManager.wait();
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMessageOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMessageOperatorNodePushable.java b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMessageOperatorNodePushable.java
index 0488ffa..313fa1a 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMessageOperatorNodePushable.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMessageOperatorNodePushable.java
@@ -162,6 +162,8 @@ public class FeedMessageOperatorNodePushable extends AbstractUnaryOutputSourceOp
                             .getStorageTimeTrackingRateTask();
                     sTask.receiveCommitAckResponse(commitResponseMessage);
                     break;
+                default:
+                    break;
             }
         }
 
@@ -222,8 +224,8 @@ public class FeedMessageOperatorNodePushable extends AbstractUnaryOutputSourceOp
         FeedId sourceFeedId = endFeedMessage.getSourceFeedId();
         SubscribableFeedRuntimeId subscribableRuntimeId = new SubscribableFeedRuntimeId(sourceFeedId,
                 FeedRuntimeType.INTAKE, partition);
-        ISubscribableRuntime feedRuntime = feedManager.getFeedSubscriptionManager().getSubscribableRuntime(
-                subscribableRuntimeId);
+        ISubscribableRuntime feedRuntime = feedManager.getFeedSubscriptionManager()
+                .getSubscribableRuntime(subscribableRuntimeId);
         IAdapterRuntimeManager adapterRuntimeManager = ((IngestionRuntime) feedRuntime).getAdapterRuntimeManager();
         adapterRuntimeManager.stop();
         if (LOGGER.isLoggable(Level.INFO)) {
@@ -252,8 +254,8 @@ public class FeedMessageOperatorNodePushable extends AbstractUnaryOutputSourceOp
             }
 
             runtimeId = new FeedRuntimeId(runtimeType, partition, FeedRuntimeId.DEFAULT_OPERAND_ID);
-            CollectionRuntime feedRuntime = (CollectionRuntime) feedManager.getFeedConnectionManager().getFeedRuntime(
-                    connectionId, runtimeId);
+            CollectionRuntime feedRuntime = (CollectionRuntime) feedManager.getFeedConnectionManager()
+                    .getFeedRuntime(connectionId, runtimeId);
             feedRuntime.getSourceRuntime().unsubscribeFeed(feedRuntime);
             if (LOGGER.isLoggable(Level.INFO)) {
                 LOGGER.info("Complete Unsubscription of " + endFeedMessage.getFeedConnectionId());
@@ -268,9 +270,9 @@ public class FeedMessageOperatorNodePushable extends AbstractUnaryOutputSourceOp
                     // feed could be primary or secondary, doesn't matter
                     SubscribableFeedRuntimeId feedSubscribableRuntimeId = new SubscribableFeedRuntimeId(
                             connectionId.getFeedId(), FeedRuntimeType.COMPUTE, partition);
-                    ISubscribableRuntime feedRuntime = feedManager.getFeedSubscriptionManager().getSubscribableRuntime(
-                            feedSubscribableRuntimeId);
-                    DistributeFeedFrameWriter dWriter = (DistributeFeedFrameWriter) feedRuntime.getFeedFrameWriter();
+                    ISubscribableRuntime feedRuntime = feedManager.getFeedSubscriptionManager()
+                            .getSubscribableRuntime(feedSubscribableRuntimeId);
+                    DistributeFeedFrameWriter dWriter = feedRuntime.getFeedFrameWriter();
                     Map<IFrameWriter, FeedFrameCollector> registeredCollectors = dWriter.getRegisteredReaders();
 
                     IFrameWriter unsubscribingWriter = null;
@@ -287,6 +289,8 @@ public class FeedMessageOperatorNodePushable extends AbstractUnaryOutputSourceOp
                         }
                     }
                     break;
+                default:
+                    break;
             }
 
         }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedUtil.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedUtil.java b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedUtil.java
index b3209d1..e5e9df3 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedUtil.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedUtil.java
@@ -29,8 +29,6 @@ import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.apache.commons.lang3.tuple.Pair;
-
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
 import org.apache.asterix.common.dataflow.AsterixLSMInvertedIndexInsertDeleteOperatorDescriptor;
 import org.apache.asterix.common.dataflow.AsterixLSMTreeInsertDeleteOperatorDescriptor;
@@ -59,6 +57,7 @@ import org.apache.asterix.metadata.functions.ExternalLibraryManager;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.IAType;
+import org.apache.commons.lang3.tuple.Pair;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
 import org.apache.hyracks.algebricks.common.utils.Triple;
@@ -233,10 +232,10 @@ public class FeedUtil {
             Pair<IOperatorDescriptor, Integer> leftOp = entry.getValue().getLeft();
             Pair<IOperatorDescriptor, Integer> rightOp = entry.getValue().getRight();
 
-            IOperatorDescriptor leftOpDesc = altered.getOperatorMap().get(
-                    oldNewOID.get(leftOp.getLeft().getOperatorId()));
-            IOperatorDescriptor rightOpDesc = altered.getOperatorMap().get(
-                    oldNewOID.get(rightOp.getLeft().getOperatorId()));
+            IOperatorDescriptor leftOpDesc = altered.getOperatorMap()
+                    .get(oldNewOID.get(leftOp.getLeft().getOperatorId()));
+            IOperatorDescriptor rightOpDesc = altered.getOperatorMap()
+                    .get(oldNewOID.get(rightOp.getLeft().getOperatorId()));
 
             altered.connect(connDesc, leftOpDesc, leftOp.getRight(), rightOpDesc, rightOp.getRight());
         }
@@ -269,6 +268,8 @@ public class FeedUtil {
                     lc.partition = ((PartitionLocationExpression) lexpr).getPartition();
                     locations.add(lc);
                     break;
+                default:
+                    break;
             }
         }
 
@@ -416,7 +417,8 @@ public class FeedUtil {
                             locations.add(lc);
                         }
                     }
-
+                    break;
+                default:
                     break;
             }
         }
@@ -444,8 +446,8 @@ public class FeedUtil {
         try {
             MetadataManager.INSTANCE.acquireReadLatch();
             ctx = MetadataManager.INSTANCE.beginTransaction();
-            feed = MetadataManager.INSTANCE.getFeed(ctx, connectionId.getFeedId().getDataverse(), connectionId
-                    .getFeedId().getFeedName());
+            feed = MetadataManager.INSTANCE.getFeed(ctx, connectionId.getFeedId().getDataverse(),
+                    connectionId.getFeedId().getFeedName());
             preProcessingRequired = feed.getAppliedFunction() != null;
             MetadataManager.INSTANCE.commitTransaction(ctx);
         } catch (Exception e) {
@@ -463,9 +465,8 @@ public class FeedUtil {
         return preProcessingRequired;
     }
 
-    public static Triple<IFeedAdapterFactory, ARecordType, AdapterType> getPrimaryFeedFactoryAndOutput(
-            PrimaryFeed feed, FeedPolicyAccessor policyAccessor, MetadataTransactionContext mdTxnCtx)
-            throws AlgebricksException {
+    public static Triple<IFeedAdapterFactory, ARecordType, AdapterType> getPrimaryFeedFactoryAndOutput(PrimaryFeed feed,
+            FeedPolicyAccessor policyAccessor, MetadataTransactionContext mdTxnCtx) throws AlgebricksException {
 
         String adapterName = null;
         DatasourceAdapter adapterEntity = null;
@@ -580,8 +581,8 @@ public class FeedUtil {
                     outputType = function.getReturnType();
                 }
             } else {
-                throw new IllegalArgumentException("Function " + appliedFunction
-                        + " associated with source feed not found in Metadata.");
+                throw new IllegalArgumentException(
+                        "Function " + appliedFunction + " associated with source feed not found in Metadata.");
             }
         }
         return outputType;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/RemoteSocketMessageListener.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/RemoteSocketMessageListener.java b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/RemoteSocketMessageListener.java
index f2211fc..5c5c068 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/RemoteSocketMessageListener.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/RemoteSocketMessageListener.java
@@ -90,7 +90,7 @@ public class RemoteSocketMessageListener {
                 char ch;
                 while (true) {
                     ch = (char) in.read();
-                    if (((int) ch) == -1) {
+                    if ((ch) == -1) {
                         break;
                     }
                     while (ch != EOL) {
@@ -119,54 +119,6 @@ public class RemoteSocketMessageListener {
                     }
                 }
             }
-
-        }
-
-    }
-
-    private static class MessageParser implements Runnable {
-
-        private Socket client;
-        private IMessageAnalyzer messageAnalyzer;
-        private static final char EOL = (char) "\n".getBytes()[0];
-
-        public MessageParser(Socket client, IMessageAnalyzer messageAnalyzer) {
-            this.client = client;
-            this.messageAnalyzer = messageAnalyzer;
-        }
-
-        @Override
-        public void run() {
-            CharBuffer buffer = CharBuffer.allocate(5000);
-            char ch;
-            try {
-                InputStream in = client.getInputStream();
-                while (true) {
-                    ch = (char) in.read();
-                    if (((int) ch) == -1) {
-                        break;
-                    }
-                    while (ch != EOL) {
-                        buffer.put(ch);
-                        ch = (char) in.read();
-                    }
-                    buffer.flip();
-                    String s = new String(buffer.array());
-                    synchronized (messageAnalyzer) {
-                        messageAnalyzer.getMessageQueue().add(s + "\n");
-                    }
-                    buffer.position(0);
-                    buffer.limit(5000);
-                }
-            } catch (IOException ioe) {
-                ioe.printStackTrace();
-            } finally {
-                try {
-                    client.close();
-                } catch (IOException ioe) {
-                    // do nothing
-                }
-            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/SocketMessageListener.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/SocketMessageListener.java b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/SocketMessageListener.java
index 3824f95..ef1d242 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/SocketMessageListener.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/SocketMessageListener.java
@@ -41,14 +41,12 @@ public class SocketMessageListener {
 
     private static final Logger LOGGER = Logger.getLogger(SocketMessageListener.class.getName());
 
-    private final int port;
     private final IMessageReceiver<String> messageReceiver;
     private final MessageListenerServer listenerServer;
 
     private ExecutorService executorService = Executors.newFixedThreadPool(10);
 
     public SocketMessageListener(int port, IMessageReceiver<String> messageReceiver) {
-        this.port = port;
         this.messageReceiver = messageReceiver;
         this.listenerServer = new MessageListenerServer(port, messageReceiver);
     }
@@ -128,7 +126,7 @@ public class SocketMessageListener {
                     char ch;
                     while (true) {
                         ch = (char) in.read();
-                        if (((int) ch) == -1) {
+                        if ((ch) == -1) {
                             break;
                         }
                         while (ch != EOL) {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java b/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
index 945305e..b626045 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
@@ -81,8 +81,8 @@ public class MetadataBuiltinFunctions {
                 }
                 Dataset dataset = metadata.findDataset(dataverseName, datasetName);
                 if (dataset == null) {
-                    throw new AlgebricksException("Could not find dataset " + datasetName + " in dataverse "
-                            + dataverseName);
+                    throw new AlgebricksException(
+                            "Could not find dataset " + datasetName + " in dataverse " + dataverseName);
                 }
                 String tn = dataset.getItemTypeName();
                 IAType t2 = metadata.findType(dataverseName, tn);
@@ -162,8 +162,8 @@ public class MetadataBuiltinFunctions {
                 }
                 Dataset dataset = metadata.findDataset(dataverseName, datasetName);
                 if (dataset == null) {
-                    throw new AlgebricksException("Could not find dataset " + datasetName + " in dataverse "
-                            + dataverseName);
+                    throw new AlgebricksException(
+                            "Could not find dataset " + datasetName + " in dataverse " + dataverseName);
                 }
                 String tn = dataset.getItemTypeName();
                 IAType t2 = metadata.findType(dataverseName, tn);
@@ -186,6 +186,6 @@ public class MetadataBuiltinFunctions {
             first = nameComponents[0];
             second = nameComponents[1];
         }
-        return new Pair(first, second);
+        return new Pair<String, String>(first, second);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-metadata/src/main/java/org/apache/asterix/metadata/valueextractors/DatasetNameValueExtractor.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/valueextractors/DatasetNameValueExtractor.java b/asterix-metadata/src/main/java/org/apache/asterix/metadata/valueextractors/DatasetNameValueExtractor.java
index e79fe1c..e81da3f 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/valueextractors/DatasetNameValueExtractor.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/valueextractors/DatasetNameValueExtractor.java
@@ -25,7 +25,6 @@ import java.io.DataInputStream;
 
 import org.apache.asterix.common.transactions.JobId;
 import org.apache.asterix.dataflow.data.nontagged.serde.AObjectSerializerDeserializer;
-import org.apache.asterix.dataflow.data.nontagged.serde.AStringSerializerDeserializer;
 import org.apache.asterix.metadata.MetadataException;
 import org.apache.asterix.metadata.api.IValueExtractor;
 import org.apache.asterix.om.base.AString;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationManager.java
----------------------------------------------------------------------
diff --git a/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationManager.java b/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationManager.java
index eaef9be..3e29828 100644
--- a/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationManager.java
+++ b/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationManager.java
@@ -110,7 +110,7 @@ public class ReplicationManager implements IReplicationManager {
     private final AtomicBoolean replicationSuspended;
     private AtomicBoolean terminateJobsReplication;
     private AtomicBoolean jobsReplicationSuspended;
-    private final static int INITIAL_BUFFER_SIZE = 4000; //4KB 
+    private final static int INITIAL_BUFFER_SIZE = 4000; //4KB
     private final Set<String> shuttingDownReplicaIds;
     //replication threads
     private ReplicationJobsProccessor replicationJobsProcessor;
@@ -125,7 +125,7 @@ public class ReplicationManager implements IReplicationManager {
     private LinkedBlockingQueue<ReplicationLogBuffer> pendingFlushLogBuffersQ;
     protected ReplicationLogBuffer currentTxnLogBuffer;
     private ReplicationLogFlusher txnlogsReplicator;
-    private Future<Object> txnLogReplicatorTask;
+    private Future<? extends Object> txnLogReplicatorTask;
     private Map<String, SocketChannel> logsReplicaSockets = null;
 
     public ReplicationManager(String nodeId, AsterixReplicationProperties replicationProperties,
@@ -240,7 +240,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Processes the replication job based on its specifications
-     * 
+     *
      * @param job
      *            The replication job
      * @param replicasSockets
@@ -376,7 +376,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Waits and reads a response from a remote replica
-     * 
+     *
      * @param socketChannel
      *            The socket to read the response from
      * @param responseBuffer
@@ -425,7 +425,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Suspends proccessing replication jobs.
-     * 
+     *
      * @param force
      *            a flag indicates if replication should be suspended right away or when the pending jobs are completed.
      */
@@ -523,7 +523,7 @@ public class ReplicationManager implements IReplicationManager {
     /**
      * Sends a shutdown event to remote replicas notifying them
      * no more logs/files will be sent from this local replica.
-     * 
+     *
      * @throws IOException
      */
     private void sendShutdownNotifiction() throws IOException {
@@ -540,7 +540,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Sends a request to remote replicas
-     * 
+     *
      * @param replicaSockets
      *            The sockets to send the request to.
      * @param requestBuffer
@@ -571,7 +571,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Closes the passed replication sockets by sending GOODBYE request to remote replicas.
-     * 
+     *
      * @param replicaSockets
      */
     private void closeReplicaSockets(Map<String, SocketChannel> replicaSockets) {
@@ -602,7 +602,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Checks the state of a remote replica by trying to ping it.
-     * 
+     *
      * @param replicaId
      *            The replica to check the state for.
      * @param async
@@ -615,7 +615,7 @@ public class ReplicationManager implements IReplicationManager {
 
         ReplicaStateChecker connector = new ReplicaStateChecker(replica, replicationProperties.getReplicationTimeOut(),
                 this, replicationProperties, suspendReplication);
-        Future<Object> ft = asterixAppRuntimeContextProvider.getThreadExecutor().submit(connector);
+        Future<? extends Object> ft = asterixAppRuntimeContextProvider.getThreadExecutor().submit(connector);
 
         if (!async) {
             //wait until task is done
@@ -631,7 +631,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Updates the state of a remote replica.
-     * 
+     *
      * @param replicaId
      *            The replica id to update.
      * @param newState
@@ -686,7 +686,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * When an ACK for a JOB_COMMIT is received, it is added to the corresponding job.
-     * 
+     *
      * @param jobId
      * @param replicaId
      *            The remote replica id the ACK received from.
@@ -763,7 +763,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Establishes a connection with a remote replica.
-     * 
+     *
      * @param replicaId
      *            The replica to connect to.
      * @return The socket of the remote replica
@@ -855,7 +855,7 @@ public class ReplicationManager implements IReplicationManager {
 
     /**
      * Suspends replications and sends a remote replica failure event to ReplicasEventsMonitor.
-     * 
+     *
      * @param replicaId
      *            the failed replica id.
      */
@@ -1071,7 +1071,7 @@ public class ReplicationManager implements IReplicationManager {
                 logRecord.deserialize(dataBuffer, true, nodeId);
 
                 if (logRecord.getNodeId().equals(nodeId)) {
-                    //store log in memory to replay it for recovery 
+                    //store log in memory to replay it for recovery
                     recoveryLogs.add(logRecord);
                     //this needs to be a new log object so that it is passed to recovery manager as a different object
                     logRecord = new LogRecord();

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java
index ca6e452..f64c888 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java
@@ -20,7 +20,6 @@ package org.apache.asterix.runtime.aggregates.stream;
 
 import java.io.DataOutput;
 
-import org.apache.asterix.common.functions.FunctionConstants;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
@@ -44,6 +43,7 @@ public class EmptyStreamAggregateDescriptor extends AbstractAggregateFunctionDyn
 
     public final static FunctionIdentifier FID = AsterixBuiltinFunctions.EMPTY_STREAM;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+        @Override
         public IFunctionDescriptor createFunctionDescriptor() {
             return new EmptyStreamAggregateDescriptor();
         }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
index 348731d..d8c442a 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
@@ -21,7 +21,6 @@ package org.apache.asterix.runtime.evaluators.accessors;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.asterix.common.functions.FunctionConstants;
 import org.apache.asterix.dataflow.data.nontagged.Coordinate;
 import org.apache.asterix.dataflow.data.nontagged.serde.ACircleSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryBase64StringConstructorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryBase64StringConstructorDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryBase64StringConstructorDescriptor.java
index 0120d6a..a589aa7 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryBase64StringConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryBase64StringConstructorDescriptor.java
@@ -30,24 +30,29 @@ import org.apache.hyracks.data.std.api.IDataOutputProvider;
 import org.apache.hyracks.dataflow.common.data.parsers.ByteArrayBase64ParserFactory;
 
 public class ABinaryBase64StringConstructorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+    private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
-        @Override public IFunctionDescriptor createFunctionDescriptor() {
+        @Override
+        public IFunctionDescriptor createFunctionDescriptor() {
             return new ABinaryBase64StringConstructorDescriptor();
         }
     };
 
-    @Override public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    @Override
+    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
-            @Override public ICopyEvaluator createEvaluator(IDataOutputProvider output) throws AlgebricksException {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public ICopyEvaluator createEvaluator(IDataOutputProvider output) throws AlgebricksException {
                 return new ABinaryHexStringConstructorDescriptor.ABinaryConstructorEvaluator(output, args[0],
                         ByteArrayBase64ParserFactory.INSTANCE);
             }
         };
     }
 
-    @Override public FunctionIdentifier getIdentifier() {
+    @Override
+    public FunctionIdentifier getIdentifier() {
         return AsterixBuiltinFunctions.BINARY_BASE64_CONSTRUCTOR;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java
index ef54caf..7b38f50 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/constructors/ABinaryHexStringConstructorDescriptor.java
@@ -46,18 +46,19 @@ import org.apache.hyracks.dataflow.common.data.parsers.IValueParserFactory;
 public class ABinaryHexStringConstructorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+        @Override
         public IFunctionDescriptor createFunctionDescriptor() {
             return new ABinaryHexStringConstructorDescriptor();
         }
     };
 
     @Override
-    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
+            private static final long serialVersionUID = 1L;
+
             @Override
-            public ICopyEvaluator createEvaluator(final IDataOutputProvider output)
-                    throws AlgebricksException {
+            public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
                 return new ABinaryConstructorEvaluator(output, args[0], ByteArrayHexParserFactory.INSTANCE);
             }
         };
@@ -80,8 +81,7 @@ public class ABinaryHexStringConstructorDescriptor extends AbstractScalarFunctio
                 .getSerializerDeserializer(BuiltinType.ANULL);
 
         public ABinaryConstructorEvaluator(final IDataOutputProvider output, ICopyEvaluatorFactory copyEvaluatorFactory,
-                IValueParserFactory valueParserFactory)
-                throws AlgebricksException {
+                IValueParserFactory valueParserFactory) throws AlgebricksException {
             out = output.getDataOutput();
             outInput = new ArrayBackedValueStorage();
             eval = copyEvaluatorFactory.createEvaluator(outInput);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java
index c40cb95..0e45417 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractBinaryStringBoolEval.java
@@ -19,12 +19,10 @@
 package org.apache.asterix.runtime.evaluators.functions;
 
 import java.io.DataOutput;
-import java.util.Arrays;
 
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.om.base.ABoolean;
 import org.apache.asterix.om.base.ANull;
-import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.EnumDeserializer;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java
index f07da63..8fc715e 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PrefixLenJaccardDescriptor.java
@@ -51,6 +51,7 @@ public class PrefixLenJaccardDescriptor extends AbstractScalarFunctionDynamicDes
     private final static byte SER_FLOAT_TYPE_TAG = ATypeTag.FLOAT.serialize();
 
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+        @Override
         public IFunctionDescriptor createFunctionDescriptor() {
             return new PrefixLenJaccardDescriptor();
         }
@@ -71,7 +72,6 @@ public class PrefixLenJaccardDescriptor extends AbstractScalarFunctionDynamicDes
                     private final ArrayBackedValueStorage inputVal = new ArrayBackedValueStorage();
                     private final ICopyEvaluator evalLen = args[0].createEvaluator(inputVal);
                     private final ICopyEvaluator evalThreshold = args[1].createEvaluator(inputVal);
-                    private final ArrayBackedValueStorage castBuffer = new ArrayBackedValueStorage();
 
                     private float similarityThresholdCache;
                     private SimilarityFiltersJaccard similarityFilters;
@@ -102,8 +102,7 @@ public class PrefixLenJaccardDescriptor extends AbstractScalarFunctionDynamicDes
                                     + ": expects type FLOAT the first argument but got "
                                     + EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(inputVal.getByteArray()[0]));
                         }
-                        float similarityThreshold = (float) AFloatSerializerDeserializer.getFloat(
-                                inputVal.getByteArray(), 1);
+                        float similarityThreshold = AFloatSerializerDeserializer.getFloat(inputVal.getByteArray(), 1);
 
                         if (similarityThreshold != similarityThresholdCache || similarityFilters == null) {
                             similarityFilters = new SimilarityFiltersJaccard(similarityThreshold);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringEqualDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringEqualDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringEqualDescriptor.java
index 312d28e..8cc3400 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringEqualDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringEqualDescriptor.java
@@ -30,12 +30,12 @@ import org.apache.hyracks.algebricks.runtime.base.ICopyEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
 import org.apache.hyracks.data.std.api.IDataOutputProvider;
 import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
-import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
 
 public class StringEqualDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
 
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+        @Override
         public IFunctionDescriptor createFunctionDescriptor() {
             return new StringEqualDescriptor();
         }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringLengthDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringLengthDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringLengthDescriptor.java
index 4f53a53..47ecb5b 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringLengthDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/StringLengthDescriptor.java
@@ -38,7 +38,6 @@ import org.apache.hyracks.algebricks.runtime.base.ICopyEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
 import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.data.std.api.IDataOutputProvider;
-import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 import org.apache.hyracks.util.string.UTF8StringUtil;
@@ -47,6 +46,7 @@ public class StringLengthDescriptor extends AbstractScalarFunctionDynamicDescrip
 
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+        @Override
         public IFunctionDescriptor createFunctionDescriptor() {
             return new StringLengthDescriptor();
         }
@@ -82,7 +82,7 @@ public class StringLengthDescriptor extends AbstractScalarFunctionDynamicDescrip
                             byte[] serString = outInput.getByteArray();
                             if (serString[0] == SER_STRING_TYPE_TAG) {
                                 int len = UTF8StringUtil.getUTFLength(outInput.getByteArray(), 1);
-                                result.setValue((long) len);
+                                result.setValue(len);
                                 int64Serde.serialize(result, out);
                             } else if (serString[0] == SER_NULL_TYPE_TAG)
                                 nullSerde.serialize(ANull.NULL, out);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java
index a6d9b57..1e676c9 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryConcatDescriptor.java
@@ -39,6 +39,8 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 import org.apache.hyracks.util.encoding.VarLenIntEncoderDecoder;
 
 public class BinaryConcatDescriptor extends AbstractScalarFunctionDynamicDescriptor {
+    private static final long serialVersionUID = 1L;
+
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -52,12 +54,12 @@ public class BinaryConcatDescriptor extends AbstractScalarFunctionDynamicDescrip
     }
 
     @Override
-    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
+            private static final long serialVersionUID = 1L;
+
             @Override
-            public ICopyEvaluator createEvaluator(final IDataOutputProvider output)
-                    throws AlgebricksException {
+            public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
                 return new AbstractCopyEvaluator(output, args) {
 
                     private final AsterixListAccessor listAccessor = new AsterixListAccessor();
@@ -69,8 +71,7 @@ public class BinaryConcatDescriptor extends AbstractScalarFunctionDynamicDescrip
                         ATypeTag typeTag = evaluateTuple(tuple, 0);
                         if (typeTag != ATypeTag.UNORDEREDLIST && typeTag != ATypeTag.ORDEREDLIST) {
                             throw new AlgebricksException(getIdentifier().getName()
-                                    + ": expects input type ORDEREDLIST/UNORDEREDLIST, but got "
-                                    + typeTag);
+                                    + ": expects input type ORDEREDLIST/UNORDEREDLIST, but got " + typeTag);
                         }
                         try {
                             listAccessor.reset(storages[0].getByteArray(), 0);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java
index c42e054..fc6329d 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/BinaryLengthDescriptor.java
@@ -41,6 +41,7 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 public class BinaryLengthDescriptor extends AbstractScalarFunctionDynamicDescriptor {
     private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
+        @Override
         public IFunctionDescriptor createFunctionDescriptor() {
             return new BinaryLengthDescriptor();
         }
@@ -48,11 +49,13 @@ public class BinaryLengthDescriptor extends AbstractScalarFunctionDynamicDescrip
 
     private static final ATypeTag[] EXPECTED_TAGS = { ATypeTag.BINARY };
 
-    @Override public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    @Override
+    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
-            @Override public ICopyEvaluator createEvaluator(final IDataOutputProvider output)
-                    throws AlgebricksException {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
                 return new AbstractCopyEvaluator(output, args) {
 
                     private AMutableInt64 result = new AMutableInt64(0);
@@ -60,7 +63,8 @@ public class BinaryLengthDescriptor extends AbstractScalarFunctionDynamicDescrip
                     private ISerializerDeserializer<AInt64> intSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.AINT64);
 
-                    @Override public void evaluate(IFrameTupleReference tuple) throws AlgebricksException {
+                    @Override
+                    public void evaluate(IFrameTupleReference tuple) throws AlgebricksException {
                         ATypeTag tag = evaluateTuple(tuple, 0);
                         try {
                             if (serializeNullIfAnyNull(tag)) {
@@ -80,7 +84,8 @@ public class BinaryLengthDescriptor extends AbstractScalarFunctionDynamicDescrip
         };
     }
 
-    @Override public FunctionIdentifier getIdentifier() {
+    @Override
+    public FunctionIdentifier getIdentifier() {
         return AsterixBuiltinFunctions.BINARY_LENGTH;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java
index af0aaba..4a30847 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryDescriptor.java
@@ -39,7 +39,7 @@ import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
 public class FindBinaryDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+    private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -55,12 +55,12 @@ public class FindBinaryDescriptor extends AbstractScalarFunctionDynamicDescripto
     private static final ATypeTag[] EXPECTED_INPUT_TAG = { ATypeTag.BINARY, ATypeTag.BINARY };
 
     @Override
-    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
+            private static final long serialVersionUID = 1L;
+
             @Override
-            public ICopyEvaluator createEvaluator(final IDataOutputProvider output)
-                    throws AlgebricksException {
+            public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
                 return new AbstractFindBinaryCopyEvaluator(output, args, getIdentifier().getName()) {
                     @Override
                     protected int getFromOffset(IFrameTupleReference tuple) throws AlgebricksException {
@@ -98,15 +98,13 @@ public class FindBinaryDescriptor extends AbstractScalarFunctionDynamicDescripto
                 if (serializeNullIfAnyNull(textTag, wordTag)) {
                     return;
                 }
-                checkTypeMachingThrowsIfNot(functionName, EXPECTED_INPUT_TAG, textTag,
-                        wordTag);
+                checkTypeMachingThrowsIfNot(functionName, EXPECTED_INPUT_TAG, textTag, wordTag);
 
                 textPtr.set(storages[0].getByteArray(), 1, storages[0].getLength() - 1);
                 wordPtr.set(storages[1].getByteArray(), 1, storages[1].getLength() - 1);
-                result.setValue(
-                        1 + indexOf(textPtr.getByteArray(), textPtr.getContentStartOffset(), textPtr.getContentLength(),
-                                wordPtr.getByteArray(), wordPtr.getContentStartOffset(), wordPtr.getContentLength(),
-                                fromOffset));
+                result.setValue(1 + indexOf(textPtr.getByteArray(), textPtr.getContentStartOffset(),
+                        textPtr.getContentLength(), wordPtr.getByteArray(), wordPtr.getContentStartOffset(),
+                        wordPtr.getContentLength(), fromOffset));
                 intSerde.serialize(result, dataOutput);
             } catch (HyracksDataException e) {
                 throw new AlgebricksException(e);
@@ -117,9 +115,8 @@ public class FindBinaryDescriptor extends AbstractScalarFunctionDynamicDescripto
     }
 
     // copy from String.indexOf(String)
-    static int indexOf(byte[] source, int sourceOffset, int sourceCount,
-            byte[] target, int targetOffset, int targetCount,
-            int fromIndex) {
+    static int indexOf(byte[] source, int sourceOffset, int sourceCount, byte[] target, int targetOffset,
+            int targetCount, int fromIndex) {
         if (fromIndex >= sourceCount) {
             return (targetCount == 0 ? sourceCount : -1);
         }
@@ -136,17 +133,14 @@ public class FindBinaryDescriptor extends AbstractScalarFunctionDynamicDescripto
         for (int i = sourceOffset + fromIndex; i <= max; i++) {
             /* Look for first character. */
             if (source[i] != first) {
-                while (++i <= max && source[i] != first)
-                    ;
+                while (++i <= max && source[i] != first);
             }
 
             /* Found first character, now look at the rest of v2 */
             if (i <= max) {
                 int j = i + 1;
                 int end = j + targetCount - 1;
-                for (int k = targetOffset + 1; j < end && source[j]
-                        == target[k]; j++, k++)
-                    ;
+                for (int k = targetOffset + 1; j < end && source[j] == target[k]; j++, k++);
 
                 if (j == end) {
                     /* Found whole string. */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java
index 753b072..12f4486 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/FindBinaryFromDescriptor.java
@@ -22,7 +22,6 @@ package org.apache.asterix.runtime.evaluators.functions.binary;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;
-import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.asterix.runtime.evaluators.base.AbstractScalarFunctionDynamicDescriptor;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -34,6 +33,7 @@ import org.apache.hyracks.data.std.api.IDataOutputProvider;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
 public class FindBinaryFromDescriptor extends AbstractScalarFunctionDynamicDescriptor {
+    private static final long serialVersionUID = 1L;
 
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
@@ -50,13 +50,15 @@ public class FindBinaryFromDescriptor extends AbstractScalarFunctionDynamicDescr
     @Override
     public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
+            private static final long serialVersionUID = 1L;
+
             @Override
             public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
-                return new FindBinaryDescriptor.AbstractFindBinaryCopyEvaluator(output, args, getIdentifier().getName()) {
+                return new FindBinaryDescriptor.AbstractFindBinaryCopyEvaluator(output, args,
+                        getIdentifier().getName()) {
                     @Override
                     protected int getFromOffset(IFrameTupleReference tuple) throws AlgebricksException {
-                        ATypeTag offsetTag = evaluateTuple(tuple, 2);
-
+                        evaluateTuple(tuple, 2);
                         int getFrom = 0;
                         try {
                             getFrom = ATypeHierarchy.getIntegerValue(storages[2].getByteArray(), 0);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java
index ffe2c9a..8adb21c 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/ParseBinaryDescriptor.java
@@ -41,7 +41,7 @@ import org.apache.hyracks.util.bytes.Base64Parser;
 import org.apache.hyracks.util.bytes.HexParser;
 
 public class ParseBinaryDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+    private static final long serialVersionUID = 1L;
     static final UTF8StringPointable HEX_FORMAT = UTF8StringPointable.generateUTF8Pointable("hex");
     static final UTF8StringPointable BASE64_FORMAT = UTF8StringPointable.generateUTF8Pointable("base64");
 
@@ -60,12 +60,12 @@ public class ParseBinaryDescriptor extends AbstractScalarFunctionDynamicDescript
     }
 
     @Override
-    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
+            private static final long serialVersionUID = 1L;
+
             @Override
-            public ICopyEvaluator createEvaluator(final IDataOutputProvider output)
-                    throws AlgebricksException {
+            public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
                 return new AbstractCopyEvaluator(output, args) {
 
                     @SuppressWarnings("unchecked")

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
index 75bb628..e6de4ce 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
@@ -43,7 +43,7 @@ import org.apache.hyracks.util.bytes.HexPrinter;
 import org.apache.hyracks.util.string.UTF8StringWriter;
 
 public class PrintBinaryDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+    private static final long serialVersionUID = 1L;
     private static final byte SER_STRING_BYTE = ATypeTag.STRING.serialize();
 
     @Override
@@ -61,12 +61,12 @@ public class PrintBinaryDescriptor extends AbstractScalarFunctionDynamicDescript
     public final static ATypeTag[] EXPECTED_INPUT_TAGS = { ATypeTag.BINARY, ATypeTag.STRING };
 
     @Override
-    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
+            private static final long serialVersionUID = 1L;
+
             @Override
-            public ICopyEvaluator createEvaluator(final IDataOutputProvider output)
-                    throws AlgebricksException {
+            public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
                 return new AbstractCopyEvaluator(output, args) {
 
                     private StringBuilder stringBuilder = new StringBuilder();

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java
index a5b5e99..b99a15b 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromDescriptor.java
@@ -28,29 +28,33 @@ import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.runtime.base.ICopyEvaluator;
 import org.apache.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
 import org.apache.hyracks.data.std.api.IDataOutputProvider;
-import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
 import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 
 public class SubBinaryFromDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+    private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
-        @Override public IFunctionDescriptor createFunctionDescriptor() {
+        @Override
+        public IFunctionDescriptor createFunctionDescriptor() {
             return new SubBinaryFromDescriptor();
         }
     };
 
-    @Override public FunctionIdentifier getIdentifier() {
+    @Override
+    public FunctionIdentifier getIdentifier() {
         return AsterixBuiltinFunctions.SUBBINARY_FROM;
     }
 
-    @Override public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    @Override
+    public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
-            @Override public ICopyEvaluator createEvaluator(final IDataOutputProvider output)
-                    throws AlgebricksException {
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
                 return new SubBinaryFromToDescriptor.AbstractSubBinaryCopyEvaluator(output, args,
                         getIdentifier().getName()) {
-                    @Override protected int getSubLength(IFrameTupleReference tuple) throws AlgebricksException {
+                    @Override
+                    protected int getSubLength(IFrameTupleReference tuple) throws AlgebricksException {
                         return Integer.MAX_VALUE;
                     }
                 };

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java
index 4f35de8..34e527e 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/SubBinaryFromToDescriptor.java
@@ -38,7 +38,7 @@ import org.apache.hyracks.dataflow.common.data.accessors.IFrameTupleReference;
 import org.apache.hyracks.util.encoding.VarLenIntEncoderDecoder;
 
 public class SubBinaryFromToDescriptor extends AbstractScalarFunctionDynamicDescriptor {
-
+    private static final long serialVersionUID = 1L;
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         @Override
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -54,12 +54,14 @@ public class SubBinaryFromToDescriptor extends AbstractScalarFunctionDynamicDesc
     @Override
     public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopyEvaluatorFactory() {
+            private static final long serialVersionUID = 1L;
+
             @Override
             public ICopyEvaluator createEvaluator(final IDataOutputProvider output) throws AlgebricksException {
                 return new AbstractSubBinaryCopyEvaluator(output, args, getIdentifier().getName()) {
                     @Override
                     protected int getSubLength(IFrameTupleReference tuple) throws AlgebricksException {
-                        ATypeTag tagSubLength = evaluateTuple(tuple, 2);
+                        evaluateTuple(tuple, 2);
                         int subLength = 0;
                         try {
                             subLength = ATypeHierarchy.getIntegerValue(storages[2].getByteArray(), 0);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/ADMDataParser.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/ADMDataParser.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/ADMDataParser.java
index 327c851..6e51311 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/ADMDataParser.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/ADMDataParser.java
@@ -29,7 +29,6 @@ import org.apache.asterix.builders.IARecordBuilder;
 import org.apache.asterix.builders.IAsterixListBuilder;
 import org.apache.asterix.builders.ListBuilderFactory;
 import org.apache.asterix.builders.OrderedListBuilder;
-import org.apache.asterix.builders.RecordBuilder;
 import org.apache.asterix.builders.RecordBuilderFactory;
 import org.apache.asterix.builders.UnorderedListBuilder;
 import org.apache.asterix.common.exceptions.AsterixException;
@@ -156,8 +155,8 @@ public class ADMDataParser extends AbstractDataParser {
         }
     }
 
-    protected boolean parseAdmInstance(IAType objectType, boolean datasetRec, DataOutput out) throws AsterixException,
-            IOException, AdmLexerException {
+    protected boolean parseAdmInstance(IAType objectType, boolean datasetRec, DataOutput out)
+            throws AsterixException, IOException, AdmLexerException {
         int token = admLexer.next();
         if (token == AdmLexer.TOKEN_EOF) {
             return false;
@@ -525,8 +524,8 @@ public class ADMDataParser extends AbstractDataParser {
         return getTargetTypeTag(expectedTypeTag, aObjectType) != null;
     }
 
-    private void parseRecord(ARecordType recType, DataOutput out, Boolean datasetRec) throws IOException,
-            AsterixException, AdmLexerException {
+    private void parseRecord(ARecordType recType, DataOutput out, Boolean datasetRec)
+            throws IOException, AsterixException, AdmLexerException {
 
         ArrayBackedValueStorage fieldValueBuffer = getTempBuffer();
         ArrayBackedValueStorage fieldNameBuffer = getTempBuffer();
@@ -592,8 +591,8 @@ public class ADMDataParser extends AbstractDataParser {
                             openRecordField = false;
                         }
                     } else {
-                        aStringFieldName.setValue(admLexer.getLastTokenImage().substring(1,
-                                admLexer.getLastTokenImage().length() - 1));
+                        aStringFieldName.setValue(
+                                admLexer.getLastTokenImage().substring(1, admLexer.getLastTokenImage().length() - 1));
                         stringSerde.serialize(aStringFieldName, fieldNameBuffer.getDataOutput());
                         openRecordField = true;
                         fieldType = null;
@@ -674,8 +673,8 @@ public class ADMDataParser extends AbstractDataParser {
         return -1;
     }
 
-    private void parseOrderedList(AOrderedListType oltype, DataOutput out) throws IOException, AsterixException,
-            AdmLexerException {
+    private void parseOrderedList(AOrderedListType oltype, DataOutput out)
+            throws IOException, AsterixException, AdmLexerException {
         ArrayBackedValueStorage itemBuffer = getTempBuffer();
         OrderedListBuilder orderedListBuilder = (OrderedListBuilder) getOrderedListBuilder();
 
@@ -716,8 +715,8 @@ public class ADMDataParser extends AbstractDataParser {
         orderedListBuilder.write(out, true);
     }
 
-    private void parseUnorderedList(AUnorderedListType uoltype, DataOutput out) throws IOException, AsterixException,
-            AdmLexerException {
+    private void parseUnorderedList(AUnorderedListType uoltype, DataOutput out)
+            throws IOException, AsterixException, AdmLexerException {
         ArrayBackedValueStorage itemBuffer = getTempBuffer();
         UnorderedListBuilder unorderedListBuilder = (UnorderedListBuilder) getUnorderedListBuilder();
 
@@ -779,8 +778,8 @@ public class ADMDataParser extends AbstractDataParser {
         return (ArrayBackedValueStorage) abvsBuilderPool.allocate(ATypeTag.BINARY);
     }
 
-    private void parseToBinaryTarget(int lexerToken, String tokenImage, DataOutput out) throws ParseException,
-            HyracksDataException {
+    private void parseToBinaryTarget(int lexerToken, String tokenImage, DataOutput out)
+            throws ParseException, HyracksDataException {
         switch (lexerToken) {
             case AdmLexer.TOKEN_HEX_CONS: {
                 parseHexBinaryString(tokenImage.toCharArray(), 1, tokenImage.length() - 2, out);
@@ -793,16 +792,16 @@ public class ADMDataParser extends AbstractDataParser {
         }
     }
 
-    private void parseToNumericTarget(ATypeTag typeTag, IAType objectType, DataOutput out) throws AsterixException,
-            IOException {
+    private void parseToNumericTarget(ATypeTag typeTag, IAType objectType, DataOutput out)
+            throws AsterixException, IOException {
         final ATypeTag targetTypeTag = getTargetTypeTag(typeTag, objectType);
         if (targetTypeTag == null || !parseValue(admLexer.getLastTokenImage(), targetTypeTag, out)) {
             throw new ParseException(mismatchErrorMessage + objectType.getTypeName() + mismatchErrorMessage2 + typeTag);
         }
     }
 
-    private void parseAndCastNumeric(ATypeTag typeTag, IAType objectType, DataOutput out) throws AsterixException,
-            IOException {
+    private void parseAndCastNumeric(ATypeTag typeTag, IAType objectType, DataOutput out)
+            throws AsterixException, IOException {
         final ATypeTag targetTypeTag = getTargetTypeTag(typeTag, objectType);
         DataOutput dataOutput = out;
         if (targetTypeTag != typeTag) {
@@ -820,7 +819,8 @@ public class ADMDataParser extends AbstractDataParser {
                 // can promote typeTag to targetTypeTag
                 ITypeConvertComputer promoteComputer = ATypeHierarchy.getTypePromoteComputer(typeTag, targetTypeTag);
                 if (promoteComputer == null) {
-                    throw new AsterixException("Can't cast the " + typeTag + " type to the " + targetTypeTag + " type.");
+                    throw new AsterixException(
+                            "Can't cast the " + typeTag + " type to the " + targetTypeTag + " type.");
                 }
                 // do the promotion; note that the type tag field should be skipped
                 promoteComputer.convertType(castBuffer.getByteArray(), castBuffer.getStartOffset() + 1,
@@ -829,7 +829,8 @@ public class ADMDataParser extends AbstractDataParser {
                 //can demote source type to the target type
                 ITypeConvertComputer demoteComputer = ATypeHierarchy.getTypeDemoteComputer(typeTag, targetTypeTag);
                 if (demoteComputer == null) {
-                    throw new AsterixException("Can't cast the " + typeTag + " type to the " + targetTypeTag + " type.");
+                    throw new AsterixException(
+                            "Can't cast the " + typeTag + " type to the " + targetTypeTag + " type.");
                 }
                 // do the demotion; note that the type tag field should be skipped
                 demoteComputer.convertType(castBuffer.getByteArray(), castBuffer.getStartOffset() + 1,
@@ -838,8 +839,8 @@ public class ADMDataParser extends AbstractDataParser {
         }
     }
 
-    private void parseConstructor(ATypeTag typeTag, IAType objectType, DataOutput out) throws AsterixException,
-            AdmLexerException, IOException {
+    private void parseConstructor(ATypeTag typeTag, IAType objectType, DataOutput out)
+            throws AsterixException, AdmLexerException, IOException {
         final ATypeTag targetTypeTag = getTargetTypeTag(typeTag, objectType);
         if (targetTypeTag != null) {
             DataOutput dataOutput = out;
@@ -876,8 +877,8 @@ public class ADMDataParser extends AbstractDataParser {
         throw new ParseException(mismatchErrorMessage + objectType.getTypeName() + ". Got " + typeTag + " instead.");
     }
 
-    private boolean parseValue(final String unquoted, ATypeTag typeTag, DataOutput out) throws AsterixException,
-            HyracksDataException, IOException {
+    private boolean parseValue(final String unquoted, ATypeTag typeTag, DataOutput out)
+            throws AsterixException, HyracksDataException, IOException {
         switch (typeTag) {
             case BOOLEAN:
                 parseBoolean(unquoted, out);
@@ -1008,8 +1009,8 @@ public class ADMDataParser extends AbstractDataParser {
         for (; offset < int16.length(); offset++) {
             if (int16.charAt(offset) >= '0' && int16.charAt(offset) <= '9') {
                 value = (short) (value * 10 + int16.charAt(offset) - '0');
-            } else if (int16.charAt(offset) == 'i' && int16.charAt(offset + 1) == '1'
-                    && int16.charAt(offset + 2) == '6' && offset + 3 == int16.length()) {
+            } else if (int16.charAt(offset) == 'i' && int16.charAt(offset + 1) == '1' && int16.charAt(offset + 2) == '6'
+                    && offset + 3 == int16.length()) {
                 break;
             } else {
                 throw new ParseException(errorMessage);
@@ -1040,8 +1041,8 @@ public class ADMDataParser extends AbstractDataParser {
         for (; offset < int32.length(); offset++) {
             if (int32.charAt(offset) >= '0' && int32.charAt(offset) <= '9') {
                 value = (value * 10 + int32.charAt(offset) - '0');
-            } else if (int32.charAt(offset) == 'i' && int32.charAt(offset + 1) == '3'
-                    && int32.charAt(offset + 2) == '2' && offset + 3 == int32.length()) {
+            } else if (int32.charAt(offset) == 'i' && int32.charAt(offset + 1) == '3' && int32.charAt(offset + 2) == '2'
+                    && offset + 3 == int32.length()) {
                 break;
             } else {
                 throw new ParseException(errorMessage);
@@ -1073,8 +1074,8 @@ public class ADMDataParser extends AbstractDataParser {
         for (; offset < int64.length(); offset++) {
             if (int64.charAt(offset) >= '0' && int64.charAt(offset) <= '9') {
                 value = (value * 10 + int64.charAt(offset) - '0');
-            } else if (int64.charAt(offset) == 'i' && int64.charAt(offset + 1) == '6'
-                    && int64.charAt(offset + 2) == '4' && offset + 3 == int64.length()) {
+            } else if (int64.charAt(offset) == 'i' && int64.charAt(offset + 1) == '6' && int64.charAt(offset + 2) == '4'
+                    && offset + 3 == int64.length()) {
                 break;
             } else {
                 throw new ParseException(errorMessage);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractDataParser.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractDataParser.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractDataParser.java
index 4b10560..4ce8ee8 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractDataParser.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/file/AbstractDataParser.java
@@ -112,6 +112,7 @@ public abstract class AbstractDataParser implements IDataParser {
     @SuppressWarnings("unchecked")
     protected ISerializerDeserializer<AString> stringSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ASTRING);
+    @SuppressWarnings("unchecked")
     protected ISerializerDeserializer<ABinary> binarySerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ABINARY);
     @SuppressWarnings("unchecked")
@@ -229,8 +230,8 @@ public abstract class AbstractDataParser implements IDataParser {
                 }
             }
             chrononTimeInMs = ADateParserFactory.parseDatePart(datetime, 0, timeOffset);
-            chrononTimeInMs += ATimeParserFactory.parseTimePart(datetime, timeOffset + 1, datetime.length()
-                    - timeOffset - 1);
+            chrononTimeInMs += ATimeParserFactory.parseTimePart(datetime, timeOffset + 1,
+                    datetime.length() - timeOffset - 1);
         } catch (Exception e) {
             throw new HyracksDataException(e);
         }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapter.java
----------------------------------------------------------------------
diff --git a/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapter.java b/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapter.java
index 2c83a20..e537ef7 100644
--- a/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapter.java
+++ b/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapter.java
@@ -27,7 +27,6 @@ import java.util.logging.Logger;
 
 import org.apache.asterix.common.feeds.api.IFeedAdapter;
 import org.apache.hyracks.api.comm.IFrameWriter;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
 
 public class SocketClientAdapter implements IFeedAdapter {
 
@@ -43,14 +42,11 @@ public class SocketClientAdapter implements IFeedAdapter {
 
     private final int port;
 
-    private final IHyracksTaskContext ctx;
-
     private boolean continueStreaming = true;
 
-    public SocketClientAdapter(Integer port, String localFile, IHyracksTaskContext ctx) {
+    public SocketClientAdapter(Integer port, String localFile) {
         this.localFile = localFile;
         this.port = port;
-        this.ctx = ctx;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapterFactory.java b/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapterFactory.java
index 6ee6401..4234a88 100644
--- a/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapterFactory.java
+++ b/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/SocketClientAdapterFactory.java
@@ -27,7 +27,6 @@ import org.apache.asterix.om.types.ARecordType;
 import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint;
 import org.apache.hyracks.algebricks.common.utils.Pair;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 public class SocketClientAdapterFactory implements IFeedAdapterFactory {
 
@@ -72,7 +71,7 @@ public class SocketClientAdapterFactory implements IFeedAdapterFactory {
     @Override
     public IDatasourceAdapter createAdapter(IHyracksTaskContext ctx, int partition) throws Exception {
         Pair<String, Integer> socket = genericSocketAdapterFactory.getSockets().get(partition);
-        return new SocketClientAdapter(socket.second, fileSplits[partition], ctx);
+        return new SocketClientAdapter(socket.second, fileSplits[partition]);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapter.java
----------------------------------------------------------------------
diff --git a/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapter.java b/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapter.java
index adce491..fffbc17 100644
--- a/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapter.java
+++ b/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapter.java
@@ -23,8 +23,6 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PipedInputStream;
 import java.io.PipedOutputStream;
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/18a9dca5/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapterFactory.java b/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapterFactory.java
index 5a01920..e9004c4 100644
--- a/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapterFactory.java
+++ b/asterix-tools/src/main/java/org/apache/asterix/tools/external/data/TwitterFirehoseFeedAdapterFactory.java
@@ -33,7 +33,6 @@ import org.apache.asterix.runtime.operators.file.AsterixTupleParserFactory.Input
 import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
 import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint;
 import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 /**
  * Factory class for creating @see{TwitterFirehoseFeedAdapter}. The adapter
@@ -78,8 +77,8 @@ public class TwitterFirehoseFeedAdapterFactory extends StreamBasedAdapterFactory
 
     @Override
     public AlgebricksPartitionConstraint getPartitionConstraint() throws Exception {
-        String ingestionCardinalityParam = (String) configuration.get(KEY_INGESTION_CARDINALITY);
-        String ingestionLocationParam = (String) configuration.get(KEY_INGESTION_LOCATIONS);
+        String ingestionCardinalityParam = configuration.get(KEY_INGESTION_CARDINALITY);
+        String ingestionLocationParam = configuration.get(KEY_INGESTION_LOCATIONS);
         String[] locations = null;
         if (ingestionLocationParam != null) {
             locations = ingestionLocationParam.split(",");
@@ -90,8 +89,8 @@ public class TwitterFirehoseFeedAdapterFactory extends StreamBasedAdapterFactory
         }
 
         List<String> chosenLocations = new ArrayList<String>();
-        String[] availableLocations = locations != null ? locations : AsterixClusterProperties.INSTANCE
-                .getParticipantNodes().toArray(new String[] {});
+        String[] availableLocations = locations != null ? locations
+                : AsterixClusterProperties.INSTANCE.getParticipantNodes().toArray(new String[] {});
         for (int i = 0, k = 0; i < count; i++, k = (k + 1) % availableLocations.length) {
             chosenLocations.add(availableLocations[k]);
         }
@@ -113,10 +112,12 @@ public class TwitterFirehoseFeedAdapterFactory extends StreamBasedAdapterFactory
         return InputDataFormat.ADM;
     }
 
+    @Override
     public boolean isRecordTrackingEnabled() {
         return false;
     }
 
+    @Override
     public IIntakeProgressTracker createIntakeProgressTracker() {
         throw new UnsupportedOperationException("Tracking of ingested records not enabled");
     }



Mime
View raw message