asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject [2/4] incubator-asterixdb git commit: remove end-of-line whitespace
Date Fri, 29 Jan 2016 22:46:13 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/GregorianCalendarSystem.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/GregorianCalendarSystem.java b/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/GregorianCalendarSystem.java
index e3be400..7f79478 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/GregorianCalendarSystem.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/GregorianCalendarSystem.java
@@ -20,8 +20,8 @@
  */
 
 /*
- *Portions of this code are based off of Joda API 
- * (http://joda-time.sourceforge.net/) 
+ *Portions of this code are based off of Joda API
+ * (http://joda-time.sourceforge.net/)
  *
  * Copyright 2001-2005 Stephen Colebourne
  *
@@ -115,7 +115,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Check whether the given date time value is a valid date time following the gregorian calendar system.
-     * 
+     *
      * @param fields
      * @return
      */
@@ -167,7 +167,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
      * <p/>
      * Reference: http://www.timeanddate.com/library/abbreviations/timezones/
      * <p/>
-     * 
+     *
      * @param timezone
      * @return
      */
@@ -182,7 +182,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Validate the given chronon time and time zone.
-     * 
+     *
      * @param year
      * @param month
      * @param day
@@ -199,7 +199,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Get the UTC chronon time of the given date time and time zone.
-     * 
+     *
      * @param year
      * @param month
      * @param day
@@ -215,7 +215,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
         long chrononTime = chrononizeBeginningOfYear(year) + hour * CHRONON_OF_HOUR + min * CHRONON_OF_MINUTE + sec
                 * CHRONON_OF_SECOND + millis + timezone;
 
-        // Added milliseconds for days of the month. 
+        // Added milliseconds for days of the month.
         chrononTime += (day - 1 + DAYS_SINCE_MONTH_BEGIN_ORDI[month - 1]) * CHRONON_OF_DAY;
 
         // Adjust the leap year
@@ -228,7 +228,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Get the chronon time (number of milliseconds) of the given time and time zone.
-     * 
+     *
      * @param hour
      * @param min
      * @param sec
@@ -266,7 +266,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
      * <p/>
      * The extended string representation is like:<br/>
      * [-]YYYY-MM-DDThh:mm:ss.xxx[Z|[+|-]hh:mm]
-     * 
+     *
      * @param chrononTime
      * @param timezone
      * @param sbder
@@ -344,7 +344,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Get the basic string representation of a chronon time with the given time zone.
-     * 
+     *
      * @param chrononTime
      * @param timezone
      * @param sbder
@@ -408,7 +408,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
      * <p/>
      * The extended and simple string representation is like:<br/>
      * [-]PnYnMnDTnHnMnS
-     * 
+     *
      * @param milliseconds
      * @param months
      * @param sbder
@@ -452,7 +452,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Check whether a given year is a leap year.
-     * 
+     *
      * @param year
      * @return
      */
@@ -464,7 +464,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
      * From Joda library GregorianChronology class: The basic calculation is
      * (y / 4) - (y / 100) + (y / 400). <br/>
      * Use y >> 2 ( (y + 3) >> 2 for negative y value) to replace y / 4 reveals eliminates two divisions.
-     * 
+     *
      * @param year
      * @return
      */
@@ -489,7 +489,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
      * <p/>
      * This code is directly from the Joda library BadicChronology.java.<br/>
      * The original authers are Stephen Colebourne, Brain S O'Neill and Guy Allard, and modified by JArod Wen on May 7th, 2012.
-     * 
+     *
      * @param chrononTime
      * @return
      */
@@ -537,7 +537,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
      * This code is directly from the Joda library BasicGJChronology.java.<br/>
      * The original authers are Stephen Colebourne, Brain S O'Neill and Guy Allard, and modified by JArod Wen on May 7th, 2012 and commented by Theodoros Ioannou on July 2012.
      * <p/>
-     * 
+     *
      * @param millis
      * @param year
      * @return
@@ -601,7 +601,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
      * This function is directly from Joda Library BasicChronology.java.<br/>
      * The original authers are Stephen Colebourne, Brain S O'Neill and Guy Allard, and modified by JArod Wen on May 7th, 2012.
      * <p/>
-     * 
+     *
      * @param millis
      * @param year
      * @param month
@@ -618,7 +618,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Get the hour of the day for the given chronon time.
-     * 
+     *
      * @param millis
      * @return
      */
@@ -640,7 +640,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Get the minute of the hour for the given chronon time.
-     * 
+     *
      * @param millis
      * @return
      */
@@ -660,7 +660,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Get the second of the minute for the given chronon time.
-     * 
+     *
      * @param millis
      * @return
      */
@@ -680,7 +680,7 @@ public class GregorianCalendarSystem implements ICalendarSystem {
 
     /**
      * Get the millisecond of the second for the given chronon time.
-     * 
+     *
      * @param millis
      * @return
      */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/ICalendarSystem.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/ICalendarSystem.java b/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/ICalendarSystem.java
index b0ed77a..5fd785d 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/ICalendarSystem.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/base/temporal/ICalendarSystem.java
@@ -22,7 +22,7 @@ public interface ICalendarSystem {
 
     /**
      * check whether the given time stamp is valid in the calendar system.
-     * 
+     *
      * @param year
      * @param month
      * @param day
@@ -37,7 +37,7 @@ public interface ICalendarSystem {
 
     /**
      * get the chronon time for the given time stamp in the calendar system.
-     * 
+     *
      * @param year
      * @param month
      * @param day
@@ -52,7 +52,7 @@ public interface ICalendarSystem {
 
     /**
      * get the chronon time for the given time in the calendar system
-     * 
+     *
      * @param hour
      * @param min
      * @param sec

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/functions/IFunctionDescriptorFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/functions/IFunctionDescriptorFactory.java b/asterix-om/src/main/java/org/apache/asterix/om/functions/IFunctionDescriptorFactory.java
index 767c7d6..526eab6 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/functions/IFunctionDescriptorFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/functions/IFunctionDescriptorFactory.java
@@ -23,7 +23,7 @@ public interface IFunctionDescriptorFactory {
 
     /**
      * the artifact registered in function manager
-     * 
+     *
      * @return a new IFunctionDescriptor instance
      */
     public IFunctionDescriptor createFunctionDescriptor();

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/io/AsterixIOException.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/io/AsterixIOException.java b/asterix-om/src/main/java/org/apache/asterix/om/io/AsterixIOException.java
index b5c40a8..498db12 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/io/AsterixIOException.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/io/AsterixIOException.java
@@ -23,7 +23,7 @@ import org.apache.asterix.common.exceptions.AsterixException;
 public abstract class AsterixIOException extends AsterixException {
 
     /**
-     * 
+     *
      */
     private static final long serialVersionUID = -6833106041007638556L;
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/pointables/AListVisitablePointable.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/AListVisitablePointable.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/AListVisitablePointable.java
index f5fd0c1..42371ea 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/AListVisitablePointable.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/AListVisitablePointable.java
@@ -67,7 +67,7 @@ public class AListVisitablePointable extends AbstractVisitablePointable {
 
     /**
      * private constructor, to prevent constructing it arbitrarily
-     * 
+     *
      * @param inputType
      */
     public AListVisitablePointable(AbstractCollectionType inputType) {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
index d9caeeb..0f66a57 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/PointableAllocator.java
@@ -64,7 +64,7 @@ public class PointableAllocator {
 
     /**
      * allocate closed part value pointable
-     * 
+     *
      * @param type
      * @return the pointable object
      */
@@ -81,7 +81,7 @@ public class PointableAllocator {
 
     /**
      * allocate open part value pointable
-     * 
+     *
      * @param typeTag
      * @return the pointable object
      */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHierarchy.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHierarchy.java b/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHierarchy.java
index b5e56c8..ded3d5c 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHierarchy.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/types/TypeHierarchy.java
@@ -22,7 +22,7 @@ import java.util.Hashtable;
 
 /*
  * Author: Guangqiang Li
- * Created on Sep 24, 2009 
+ * Created on Sep 24, 2009
  */
 public class TypeHierarchy {
     private static Hashtable<String, String> parentMap = new Hashtable<String, String>();

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java b/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
index 082618b..33584d4 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
@@ -41,7 +41,7 @@ import org.apache.hyracks.storage.common.IStorageManagerInterface;
 
 /*
  * Acts as an holder class for IndexRegistryProvider, AsterixStorageManager
- * instances that are accessed from the NCs. In addition an instance of ICCApplicationContext 
+ * instances that are accessed from the NCs. In addition an instance of ICCApplicationContext
  * is stored for access by the CC.
  */
 public class AsterixAppContextInfo implements IAsterixApplicationContextInfo, IAsterixPropertiesProvider {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectFactory.java b/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectFactory.java
index ecd7d21..48dcbfb 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectFactory.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectFactory.java
@@ -26,7 +26,7 @@ public interface IObjectFactory<E, T> {
 
     /**
      * create an element of type E
-     * 
+     *
      * @param arg
      * @return an E element
      */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectPool.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectPool.java b/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectPool.java
index d8cfffa..d3d76e6 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectPool.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/util/container/IObjectPool.java
@@ -26,7 +26,7 @@ public interface IObjectPool<E, T> {
 
     /**
      * Give client an E instance
-     * 
+     *
      * @param arg
      *            the argument to create E
      * @return an E instance

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-replication/src/main/java/org/apache/asterix/replication/functions/ReplicationProtocol.java
----------------------------------------------------------------------
diff --git a/asterix-replication/src/main/java/org/apache/asterix/replication/functions/ReplicationProtocol.java b/asterix-replication/src/main/java/org/apache/asterix/replication/functions/ReplicationProtocol.java
index be8f8e3..790df66 100644
--- a/asterix-replication/src/main/java/org/apache/asterix/replication/functions/ReplicationProtocol.java
+++ b/asterix-replication/src/main/java/org/apache/asterix/replication/functions/ReplicationProtocol.java
@@ -43,7 +43,7 @@ public class ReplicationProtocol {
     public final static int REPLICATION_REQUEST_TYPE_SIZE = Integer.BYTES;
     public final static int REPLICATION_REQUEST_HEADER_SIZE = REPLICATION_REQUEST_TYPE_SIZE + Integer.BYTES;
 
-    /* 
+    /*
      * ReplicationRequestType:
      * REPLICATE_LOG: txn log replication
      * REPLICATE_FILE: replicate a file(s)
@@ -329,7 +329,7 @@ public class ReplicationProtocol {
 
     /**
      * Sends a goodbye request to a remote replica indicating the end of a replication request.
-     * 
+     *
      * @param socketChannel
      *            the remote replica socket.
      * @throws IOException
@@ -343,4 +343,4 @@ public class ReplicationProtocol {
         ByteBuffer ackBuffer = ReplicationProtocol.getAckBuffer();
         NetworkingUtil.transferBufferToChannel(socketChannel, ackBuffer);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-replication/src/main/java/org/apache/asterix/replication/management/NetworkingUtil.java
----------------------------------------------------------------------
diff --git a/asterix-replication/src/main/java/org/apache/asterix/replication/management/NetworkingUtil.java b/asterix-replication/src/main/java/org/apache/asterix/replication/management/NetworkingUtil.java
index 90291d7..6023cb1 100644
--- a/asterix-replication/src/main/java/org/apache/asterix/replication/management/NetworkingUtil.java
+++ b/asterix-replication/src/main/java/org/apache/asterix/replication/management/NetworkingUtil.java
@@ -93,7 +93,7 @@ public class NetworkingUtil {
             socketChannel.write(requestBuffer);
         }
     }
-    
+
     //unused
     public static void sendFileNIO(FileChannel fileChannel, SocketChannel socketChannel) throws IOException {
         long fileSize = fileChannel.size();
@@ -107,4 +107,4 @@ public class NetworkingUtil {
         long fileSize = fileChannel.size();
         fileChannel.transferFrom(socketChannel, pos, fileSize);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationChannel.java
----------------------------------------------------------------------
diff --git a/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationChannel.java b/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationChannel.java
index c97fe94..fd1df0b 100644
--- a/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationChannel.java
+++ b/asterix-replication/src/main/java/org/apache/asterix/replication/management/ReplicationChannel.java
@@ -571,7 +571,7 @@ public class ReplicationChannel extends Thread implements IReplicationChannel {
             long remoteLSN = lsmCompProp.getOriginalLSN();
             //LSN=0 (bulkload) does not need to be updated and there is no flush log corresponding to it
             if (remoteLSN == 0) {
-                //since this is the first LSM component of this index, 
+                //since this is the first LSM component of this index,
                 //then set the mapping in the LSN_MAP to the current log LSN because
                 //no other log could've been received for this index since bulkload replication is synchronous.
                 lsmCompProp.setReplicaLSN(logManager.getAppendLSN());
@@ -606,12 +606,12 @@ public class ReplicationChannel extends Thread implements IReplicationChannel {
                     Long mappingLSN = lsmMap.get(lsmCompProp.getOriginalLSN());
                     if (mappingLSN == null) {
                         /*
-                         * this shouldn't happen unless this node just recovered and the first component it received 
+                         * this shouldn't happen unless this node just recovered and the first component it received
                          * is a merged component due to an on-going merge operation while recovery on the remote replica.
                          * In this case, we use the current append LSN since no new records exist for this index,
                          * otherwise they would've been flushed.
                          * This could be prevented by waiting for any IO to finish on the remote replica during recovery.
-                         * 
+                         *
                          */
                         mappingLSN = logManager.getAppendLSN();
                     } else {
@@ -623,8 +623,8 @@ public class ReplicationChannel extends Thread implements IReplicationChannel {
             Path path = Paths.get(syncTask.getComponentFilePath());
             if (Files.notExists(path)) {
                 /*
-                 * This could happen when a merged component arrives and deletes the flushed 
-                 * component (which we are trying to update) before its flush log arrives since logs and components are received 
+                 * This could happen when a merged component arrives and deletes the flushed
+                 * component (which we are trying to update) before its flush log arrives since logs and components are received
                  * on different threads.
                  */
                 return;
@@ -647,4 +647,4 @@ public class ReplicationChannel extends Thread implements IReplicationChannel {
             }
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSumAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSumAggregateFunction.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSumAggregateFunction.java
index 91234e0..f6a7c4a 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSumAggregateFunction.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SqlSumAggregateFunction.java
@@ -30,7 +30,7 @@ import org.apache.hyracks.data.std.api.IDataOutputProvider;
 
 public class SqlSumAggregateFunction extends AbstractSumAggregateFunction {
     private final boolean isLocalAgg;
-    
+
     public SqlSumAggregateFunction(ICopyEvaluatorFactory[] args, IDataOutputProvider provider, boolean isLocalAgg)
             throws AlgebricksException {
         super(args, provider);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SumAggregateFunction.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SumAggregateFunction.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SumAggregateFunction.java
index 0296949..959a71d 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SumAggregateFunction.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/aggregates/std/SumAggregateFunction.java
@@ -38,7 +38,7 @@ public class SumAggregateFunction extends AbstractSumAggregateFunction {
     }
 
     @Override
-    protected boolean skipStep() { 
+    protected boolean skipStep() {
         return (aggType == ATypeTag.NULL);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java
index a6a1a92..780ec99 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractNumericArithmeticEval.java
@@ -69,7 +69,7 @@ public abstract class AbstractNumericArithmeticEval extends AbstractScalarFuncti
     /**
      * abstract method for arithmetic operation between a time instance (date/time/datetime)
      * and a duration (duration/year-month-duration/day-time-duration)
-     * 
+     *
      * @param chronon
      * @param yearMonth
      * @param dayTime
@@ -81,7 +81,7 @@ public abstract class AbstractNumericArithmeticEval extends AbstractScalarFuncti
 
     /**
      * abstract method for arithmetic operation between two time instances (date/time/datetime)
-     * 
+     *
      * @param chronon0
      * @param chronon1
      * @return

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
index cb66765..b662c5b 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java
@@ -29,7 +29,7 @@ public class IntervalLogic {
      * <p/>
      * |------|<br/>
      * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|------|<br/>
-     * 
+     *
      * @param s1
      * @param e1
      * @param s2
@@ -49,7 +49,7 @@ public class IntervalLogic {
      * <p/>
      * |------|<br/>
      * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|------|<br/>
-     * 
+     *
      * @param s1
      * @param e1
      * @param s2
@@ -69,7 +69,7 @@ public class IntervalLogic {
      * <p/>
      * |------|<br/>
      * &nbsp;&nbsp;&nbsp;&nbsp;|------|<br/>
-     * 
+     *
      * @param s1
      * @param e1
      * @param s2
@@ -87,7 +87,7 @@ public class IntervalLogic {
     /**
      * Something is shared by both interval 1 and interval 2.
      * <p/>
-     * 
+     *
      * @param s1
      * @param e1
      * @param s2
@@ -103,7 +103,7 @@ public class IntervalLogic {
      * <p/>
      * |------|<br/>
      * |-------|<br/>
-     * 
+     *
      * @param s1
      * @param e1
      * @param s2
@@ -123,7 +123,7 @@ public class IntervalLogic {
      * <p/>
      * |------|<br/>
      * &nbsp;&nbsp;|----|<br/>
-     * 
+     *
      * @param s1
      * @param e1
      * @param s2
@@ -143,7 +143,7 @@ public class IntervalLogic {
      * <p/>
      * &nbsp;&nbsp;|-----|<br/>
      * |------|<br/>
-     * 
+     *
      * @param s1
      * @param e1
      * @param s2

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
index 9f59148..655fd2a 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
@@ -104,7 +104,7 @@ public class PersistentLocalResourceRepository implements ILocalResourceReposito
 
         //create storage metadata file (This file is used to locate the root storage directory after instance restarts).
         //TODO with the existing cluster configuration file being static and distributed on all NCs, we can find out the storage root
-        //directory without looking at this file. This file could potentially store more information, otherwise no need to keep it. 
+        //directory without looking at this file. This file could potentially store more information, otherwise no need to keep it.
         for (int i = 0; i < mountPoints.length; i++) {
             File storageMetadataFile = getStorageMetadataFile(mountPoints[i], nodeId, i);
             File storageMetadataDir = storageMetadataFile.getParentFile();
@@ -404,4 +404,4 @@ public class PersistentLocalResourceRepository implements ILocalResourceReposito
         //currently each partition is replicated on the same IO device number on all NCs.
         return mountPoints[clusterPartitions.get(partition).getIODeviceNum()];
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DatasetLockInfo.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DatasetLockInfo.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DatasetLockInfo.java
index db187fb..dfb5d1e 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DatasetLockInfo.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DatasetLockInfo.java
@@ -178,7 +178,7 @@ public class DatasetLockInfo {
             }
             entityInfo = entityLockInfoManager.findEntityInfoFromHolderList(eLockInfo, jobId, hashVal);
             if (entityInfo == -1) {
-                //find the entityInfo from the waiter list of entityLockInfo. 
+                //find the entityInfo from the waiter list of entityLockInfo.
                 //There is a case where dataset-granule lock is acquired, but entity-granule lock is not acquired yet.
                 //In this case, the waiter of the entityLockInfo represents the holder of the datasetLockInfo.
                 waiterObjId = entityLockInfoManager.findWaiterFromWaiterList(eLockInfo, jobId, hashVal);
@@ -241,7 +241,7 @@ public class DatasetLockInfo {
      * Remove holder from linked list of Actor.
      * Also, remove the corresponding resource from linked list of resource
      * in order to minimize JobInfo's resource link traversal.
-     * 
+     *
      * @param holder
      * @param jobInfo
      */
@@ -298,7 +298,7 @@ public class DatasetLockInfo {
 
     /**
      * append new waiter to the end of waiters
-     * 
+     *
      * @param waiterObjId
      */
     public void addWaiter(int waiterObjId) {
@@ -533,4 +533,4 @@ public class DatasetLockInfo {
         return entityResourceHT;
     }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DeadlockDetector.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DeadlockDetector.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DeadlockDetector.java
index 13768bd..f8a4f5e 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DeadlockDetector.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/DeadlockDetector.java
@@ -75,7 +75,7 @@ public class DeadlockDetector {
         visitedHolderList.clear(true);
 
         //holderlist contains jobId
-        //resourceList contains entityInfo's slot numbers instead of resourceId in order to avoid object creation 
+        //resourceList contains entityInfo's slot numbers instead of resourceId in order to avoid object creation
         //since resourceId consists of datasetId and PKHashValue
 
         //get holder list(jobId list)
@@ -93,7 +93,7 @@ public class DeadlockDetector {
             if (isUpgrade && dLockInfo.getFirstUpgrader() != -1) {
                 return false;
             }
-            //there is no case such that while a job is holding any mode of lock on a dataset and waits for the same dataset as an waiter. 
+            //there is no case such that while a job is holding any mode of lock on a dataset and waits for the same dataset as an waiter.
             //But the job may wait for the same dataset as an upgrader.
         }
 
@@ -153,7 +153,7 @@ public class DeadlockDetector {
     /**
      * Get holder list of dataset if hashValue == -1. Get holder list of entity otherwise.
      * Where, a holder is a jobId, not entityInfo's slotNum
-     * 
+     *
      * @param datasetId
      * @param hashValue
      * @param holderList
@@ -223,7 +223,7 @@ public class DeadlockDetector {
 
     /**
      * Get waiting resource list of jobId, where a resource is represented with entityInfo's slot number
-     * 
+     *
      * @param jobId
      * @param resourceList
      */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityInfoManager.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityInfoManager.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityInfoManager.java
index ab008a4..0e607ee 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityInfoManager.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityInfoManager.java
@@ -127,7 +127,7 @@ public class EntityInfoManager {
     //            System.out.println(eiMgr.prettyPrint());
     //        }
     //    }
-    //    
+    //
     //    ////////////////////////////////////////////////
     //    // end of unit test
     //    ////////////////////////////////////////////////
@@ -200,7 +200,7 @@ public class EntityInfoManager {
      * pArray status : O O x x x x x
      * However, in the above case, if we subtract the deinitialized children's slots,
      * needShrink() will return false even if we shrink the pArray at this case.
-     * 
+     *
      * @return
      */
     private boolean needShrink() {
@@ -514,7 +514,7 @@ class ChildEntityInfoArrayManager {
     //public static final int DATASET_ACTOR_OFFSET = 28;
 
     //byte offset of nextFreeSlotNum which shares the same space of JobId
-    //If a slot is in use, the space is used for JobId. Otherwise, it is used for nextFreeSlotNum. 
+    //If a slot is in use, the space is used for JobId. Otherwise, it is used for nextFreeSlotNum.
     public static final int NEXT_FREE_SLOT_OFFSET = 0;
 
     private ByteBuffer buffer;
@@ -727,4 +727,4 @@ class ChildEntityInfoArrayManager {
     //    public int getNextDatasetActor(int slotNum) {
     //        return buffer.getInt(slotNum * ENTITY_INFO_SIZE + DATASET_ACTOR_OFFSET);
     //    }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityLockInfoManager.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityLockInfoManager.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityLockInfoManager.java
index be47101..c3de3c4 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityLockInfoManager.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/EntityLockInfoManager.java
@@ -49,30 +49,30 @@ public class EntityLockInfoManager {
     //        ////////////////////////////////////////////////
     //        // begin of unit test
     //        ////////////////////////////////////////////////
-    //    
+    //
     //        public static final int SHRINK_TIMER_THRESHOLD = 0; //for unit test
-    //    
+    //
     //        /**
     //         * @param args
     //         */
     //        public static void main(String[] args) {
     //            final int DataSize = 5000;
-    //    
+    //
     //            int i, j;
     //            int slots = ChildEntityLockInfoArrayManager.NUM_OF_SLOTS;
     //            int data[] = new int[DataSize];
     //            EntityLockInfoManager eliMgr = new EntityLockInfoManager();
-    //    
+    //
     //            //allocate: 50
     //            System.out.println("allocate: 50");
     //            for (i = 0; i < 5; i++) {
     //                for (j = i * slots; j < i * slots + slots; j++) {
     //                    data[j] = eliMgr.allocate();
     //                }
-    //    
+    //
     //                System.out.println(eliMgr.prettyPrint());
     //            }
-    //    
+    //
     //            //deallocate from the last child to the first child
     //            System.out.println("deallocate from the last child to the first child");
     //            for (i = 4; i >= 0; i--) {
@@ -81,58 +81,58 @@ public class EntityLockInfoManager {
     //                }
     //                System.out.println(eliMgr.prettyPrint());
     //            }
-    //    
+    //
     //            //allocate: 50
     //            System.out.println("allocate: 50");
     //            for (i = 0; i < 5; i++) {
     //                for (j = i * slots; j < i * slots + slots; j++) {
     //                    data[j] = eliMgr.allocate();
     //                }
-    //    
+    //
     //                System.out.println(eliMgr.prettyPrint());
     //            }
-    //    
+    //
     //            //deallocate from the first child to last child
     //            System.out.println("deallocate from the first child to last child");
     //            for (i = 0; i < 5; i++) {
     //                for (j = i * slots; j < i * slots + slots; j++) {
     //                    eliMgr.deallocate(data[j]);
     //                }
-    //    
+    //
     //                System.out.println(eliMgr.prettyPrint());
     //            }
-    //    
+    //
     //            //allocate: 50
     //            System.out.println("allocate: 50");
     //            for (i = 0; i < 5; i++) {
     //                for (j = i * slots; j < i * slots + slots; j++) {
     //                    data[j] = eliMgr.allocate();
     //                }
-    //    
+    //
     //                System.out.println(eliMgr.prettyPrint());
     //            }
-    //    
+    //
     //            //deallocate from the first child to 4th child
     //            System.out.println("deallocate from the first child to 4th child");
     //            for (i = 0; i < 4; i++) {
     //                for (j = i * slots; j < i * slots + slots; j++) {
     //                    eliMgr.deallocate(data[j]);
     //                }
-    //    
+    //
     //                System.out.println(eliMgr.prettyPrint());
     //            }
-    //    
+    //
     //            //allocate: 40
     //            System.out.println("allocate: 40");
     //            for (i = 0; i < 4; i++) {
     //                for (j = i * slots; j < i * slots + slots; j++) {
     //                    data[j] = eliMgr.allocate();
     //                }
-    //    
+    //
     //                System.out.println(eliMgr.prettyPrint());
     //            }
     //        }
-    //        
+    //
     //        ////////////////////////////////////////////////
     //        // end of unit test
     //        ////////////////////////////////////////////////
@@ -199,7 +199,7 @@ public class EntityLockInfoManager {
      * pArray status : O O x x x x x
      * However, in the above case, if we subtract the deinitialized children's slots,
      * needShrink() will return false even if we shrink the pArray at this case.
-     * 
+     *
      * @return
      */
     private boolean needShrink() {
@@ -339,7 +339,7 @@ public class EntityLockInfoManager {
      * Remove holder from linked list of Actor.
      * Also, remove the corresponding resource from linked list of resource
      * in order to minimize JobInfo's resource link traversal.
-     * 
+     *
      * @param slotNum
      * @param holder
      * @param jobInfo
@@ -684,7 +684,7 @@ class ChildEntityLockInfoArrayManager {
     public static final int UPGRADER_OFFSET = 12;
 
     //byte offset of nextFreeSlotNum which shares the same space with LastHolder field
-    //If a slot is in use, the space is used for LastHolder. Otherwise, it is used for nextFreeSlotNum. 
+    //If a slot is in use, the space is used for LastHolder. Otherwise, it is used for nextFreeSlotNum.
     public static final int NEXT_FREE_SLOT_OFFSET = 4;
 
     private ByteBuffer buffer;
@@ -824,4 +824,4 @@ class ChildEntityLockInfoArrayManager {
     public int getUpgrader(int slotNum) {
         return buffer.getInt(slotNum * ENTITY_LOCK_INFO_SIZE + UPGRADER_OFFSET);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/JobInfo.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/JobInfo.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/JobInfo.java
index 39eb213..ebbb0b8 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/JobInfo.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/JobInfo.java
@@ -29,7 +29,7 @@ public class JobInfo {
     private int firstWaitingResource; //resource(entity or dataset) which this job is waiting for
     private int upgradingResource; //resource(entity or dataset) which this job is waiting for to upgrade
 
-    private PrimitiveIntHashMap datasetISLockHT; //used for keeping dataset-granule-lock's count acquired by this job. 
+    private PrimitiveIntHashMap datasetISLockHT; //used for keeping dataset-granule-lock's count acquired by this job.
 
     public JobInfo(EntityInfoManager entityInfoManager, LockWaiterManager lockWaiterManager, ITransactionContext txnCtx) {
         this.entityInfoManager = entityInfoManager;
@@ -144,7 +144,7 @@ public class JobInfo {
         lastObj.setNextWaitingResourceObjId(-1);
 
         //        if (LockManager.IS_DEBUG_MODE) {
-        //            System.out.println(Thread.currentThread().getName()+"\tJobInfo_AddWaiter:"+ waiterObjId + ", FirstWaiter:"+firstWaitingResource);            
+        //            System.out.println(Thread.currentThread().getName()+"\tJobInfo_AddWaiter:"+ waiterObjId + ", FirstWaiter:"+firstWaitingResource);
         //        }
     }
 
@@ -197,7 +197,7 @@ public class JobInfo {
         }
 
         //        if (LockManager.IS_DEBUG_MODE) {
-        //            System.out.println(Thread.currentThread().getName()+"\tJobInfo_RemoveWaiter:"+ waiterObjId + ", FirstWaiter:"+firstWaitingResource);            
+        //            System.out.println(Thread.currentThread().getName()+"\tJobInfo_RemoveWaiter:"+ waiterObjId + ", FirstWaiter:"+firstWaitingResource);
         //        }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManager.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManager.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManager.java
index ee9fd84..f1e1915 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManager.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManager.java
@@ -54,10 +54,10 @@ import org.apache.hyracks.api.lifecycle.ILifeCycleComponent;
 public class LockManager implements ILockManager, ILifeCycleComponent {
 
     public static final boolean IS_DEBUG_MODE = false;//true
-    //This variable indicates that the dataset granule X lock request is allowed when 
-    //there are concurrent lock requests. As of 4/16/2013, we only allow the dataset granule X lock 
+    //This variable indicates that the dataset granule X lock request is allowed when
+    //there are concurrent lock requests. As of 4/16/2013, we only allow the dataset granule X lock
     //during DDL operation which is preceded by holding X latch on metadata.
-    //Therefore, we don't allow the concurrent lock requests with the dataset granule X lock. 
+    //Therefore, we don't allow the concurrent lock requests with the dataset granule X lock.
     public static final boolean ALLOW_DATASET_GRANULE_X_LOCK_WITH_OTHER_CONCURRENT_LOCK_REQUESTS = false;
 
     public static final boolean ALLOW_ESCALATE_FROM_ENTITY_TO_DATASET = true;
@@ -69,7 +69,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
 
     //all threads accessing to LockManager's tables such as jobHT and datasetResourceHT
     //are serialized through LockTableLatch. All threads waiting the latch will be fairly served
-    //in FIFO manner when the latch is available. 
+    //in FIFO manner when the latch is available.
     private final ReadWriteLock lockTableLatch;
     private final ReadWriteLock waiterLatch;
     private final HashMap<JobId, JobInfo> jobHT;
@@ -165,7 +165,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                 }
             }
 
-            //#. if the datasetLockInfo doesn't exist in datasetResourceHT 
+            //#. if the datasetLockInfo doesn't exist in datasetResourceHT
             if (dLockInfo == null || dLockInfo.isNoHolder()) {
                 if (dLockInfo == null) {
                     dLockInfo = new DatasetLockInfo(entityLockInfoManager, entityInfoManager, lockWaiterManager);
@@ -269,7 +269,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
         int entityHashValue;
         int did;//int-type dataset id
 
-        //while traversing all holding resources, 
+        //while traversing all holding resources,
         //release IS locks on the escalated dataset and
         //release S locks on the corresponding enttites
         //by calling unlock() method.
@@ -290,7 +290,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
     }
 
     private int needEscalateFromEntityToDataset(JobInfo jobInfo, int datasetId, byte lockMode) {
-        //we currently allow upgrade only if the lockMode is S. 
+        //we currently allow upgrade only if the lockMode is S.
         if (lockMode != LockMode.S) {
             return DONOT_ESCALATE;
         }
@@ -403,10 +403,10 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                 //[Notice] Mimicking SIX mode
                 //When the lock escalation from IS to S in dataset-level is allowed, the following case occurs
                 //DatasetLockInfo's SCount = 1 and the same job who carried out the escalation tries to insert,
-                //then the job should be able to insert without being blocked by itself. 
-                //Our approach is to introduce SIX mode, but we don't have currently, 
-                //so I simply mimicking SIX by allowing S and IX coexist in the dataset level 
-                //only if their job id is identical for the requests. 
+                //then the job should be able to insert without being blocked by itself.
+                //Our approach is to introduce SIX mode, but we don't have currently,
+                //so I simply mimicking SIX by allowing S and IX coexist in the dataset level
+                //only if their job id is identical for the requests.
                 if (ALLOW_ESCALATE_FROM_ENTITY_TO_DATASET) {
                     if (datasetLockMode == LockMode.IX && dLockInfo.getSCount() == 1
                             && jobInfo.isDatasetLockGranted(dId, LockMode.S)) {
@@ -422,20 +422,20 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
 
                 /////////////////////////////////////////////////////////////////////////////////////////////
                 if (ALLOW_DATASET_GRANULE_X_LOCK_WITH_OTHER_CONCURRENT_LOCK_REQUESTS) {
-                    //The following case only may occur when the dataset level X lock is requested 
+                    //The following case only may occur when the dataset level X lock is requested
                     //with the other lock
 
                     //[Notice]
                     //There has been no same caller as (jId, dId, entityHashValue) triplet.
                     //But there could be the same caller in terms of (jId, dId) pair.
-                    //For example, 
+                    //For example,
                     //1) (J1, D1, E1) acquires IS in Dataset D1
                     //2) (J2, D1, -1) requests X  in Dataset D1, but waits
-                    //3) (J1, D1, E2) requests IS in Dataset D1, but should wait 
+                    //3) (J1, D1, E2) requests IS in Dataset D1, but should wait
                     //The 3) may cause deadlock if 1) and 3) are under the same thread.
                     //Even if (J1, D1, E1) and (J1, D1, E2) are two different thread, instead of
                     //aborting (J1, D1, E1) triggered by the deadlock, we give higher priority to 3) than 2)
-                    //as long as the dataset level lock D1 is being held by the same jobId. 
+                    //as long as the dataset level lock D1 is being held by the same jobId.
                     //The above consideration is covered in the following code.
                     //find the same dataset-granule lock request, that is, (J1, D1) pair in the above example.
                     if (jobInfo.isDatasetLockGranted(dId, LockMode.IS)) {
@@ -494,7 +494,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
             }
         } else {
             isUpgrade = isLockUpgrade(entityInfoManager.getDatasetLockMode(entityInfo), lockMode);
-            if (isUpgrade) { //upgrade call 
+            if (isUpgrade) { //upgrade call
                 //wait if any upgrader exists or upgrading lock mode is not compatible
                 if (dLockInfo.getFirstUpgrader() != -1 || !dLockInfo.isUpgradeCompatible(datasetLockMode, entityInfo)) {
                     waiterCount = handleLockWaiter(dLockInfo, -1, entityInfo, true, true, txnContext, jobInfo, -1);
@@ -567,7 +567,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
 
                     entityLockInfoManager.increaseLockCount(eLockInfo, LockMode.X, (short) (weakerModeLockCount
                             + waiterCount - 1));//new lock mode
-                    entityLockInfoManager.decreaseLockCount(eLockInfo, LockMode.S, (short) weakerModeLockCount);//old lock mode 
+                    entityLockInfoManager.decreaseLockCount(eLockInfo, LockMode.S, (short) weakerModeLockCount);//old lock mode
                 }
                 return;
             }
@@ -608,7 +608,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
 
                         entityLockInfoManager.increaseLockCount(eLockInfo, LockMode.X, (short) (weakerModeLockCount
                                 + waiterCount - 1));//new lock mode
-                        entityLockInfoManager.decreaseLockCount(eLockInfo, LockMode.S, (short) weakerModeLockCount);//old lock mode 
+                        entityLockInfoManager.decreaseLockCount(eLockInfo, LockMode.S, (short) weakerModeLockCount);//old lock mode
                     }
 
                 } else {//duplicated call
@@ -706,7 +706,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
 
             if (entityInfoManager.getEntityLockCount(entityInfo) == 0
                     && entityInfoManager.getDatasetLockCount(entityInfo) == 0) {
-                int threadCount = 0; //number of threads(in the same job) waiting on the same resource 
+                int threadCount = 0; //number of threads(in the same job) waiting on the same resource
                 int waiterObjId = jobInfo.getFirstWaitingResource();
                 int waitingEntityInfo;
                 LockWaiter waiterObj;
@@ -720,9 +720,9 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                 //this can be done in the following single function call.
                 entityLockInfoManager.removeHolder(eLockInfo, entityInfo, jobInfo);
 
-                //2) if 
+                //2) if
                 //      there is no waiting thread on the same resource (this can be checked through jobInfo)
-                //   then 
+                //   then
                 //      a) delete the corresponding entityInfo
                 //      b) write commit log for the unlocked resource(which is a committed txn).
                 while (waiterObjId != -1) {
@@ -795,10 +795,10 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                 return;
             }
 
-            //remove waiterObj of JobInfo 
+            //remove waiterObj of JobInfo
             //[Notice]
             //waiterObjs may exist if aborted thread is the caller of this function.
-            //Even if there are the waiterObjs, there is no waiting thread on the objects. 
+            //Even if there are the waiterObjs, there is no waiting thread on the objects.
             //If the caller of this function is an aborted thread, it is guaranteed that there is no waiting threads
             //on the waiterObjs since when the aborted caller thread is waken up, all other waiting threads are
             //also waken up at the same time through 'notifyAll()' call.
@@ -883,8 +883,8 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                         wakeUpDatasetLockWaiters(dLockInfo);
 
                         //remove the holder from datasetLockInfo only if the lock is dataset-granule lock.
-                        //--> this also removes the holding resource from jobInfo               
-                        //(Because the IX and IS lock's holders are handled implicitly, 
+                        //--> this also removes the holding resource from jobInfo
+                        //(Because the IX and IS lock's holders are handled implicitly,
                         //those are not in the holder list of datasetLockInfo.)
                         dLockInfo.removeHolder(entityInfo, jobInfo);
                     }
@@ -921,7 +921,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                         //wakeup waiters of entityLock
                         wakeUpEntityLockWaiters(eLockInfo);
 
-                        //remove the holder from entityLockInfo 
+                        //remove the holder from entityLockInfo
                         //--> this also removes the holding resource from jobInfo
                         entityLockInfoManager.removeHolder(eLockInfo, entityInfo, jobInfo);
                     }
@@ -1000,7 +1000,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
 
             dLockInfo = datasetResourceHT.get(datasetId);
 
-            //#. if the datasetLockInfo doesn't exist in datasetResourceHT 
+            //#. if the datasetLockInfo doesn't exist in datasetResourceHT
             if (dLockInfo == null || dLockInfo.isNoHolder()) {
                 if (IS_DEBUG_MODE) {
                     trackLockRequest("Granted", RequestType.INSTANT_TRY_LOCK, datasetId, entityHashValue, lockMode,
@@ -1016,9 +1016,9 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
             if (datasetLockMode == LockMode.IS) {
                 //[Notice]
                 //Skip checking the dataset level lock compatibility if the requested LockMode is IS lock.
-                //We know that this internalInstantTryLock() call with IS lock mode will be always granted 
-                //because we don't allow X lock on dataset-level except DDL operation. 
-                //During DDL operation, all other operations will be pending, so there is no conflict. 
+                //We know that this internalInstantTryLock() call with IS lock mode will be always granted
+                //because we don't allow X lock on dataset-level except DDL operation.
+                //During DDL operation, all other operations will be pending, so there is no conflict.
                 isSuccess = true;
             } else {
                 isSuccess = instantTryLockDatasetGranule(datasetId, entityHashValue, lockMode, txnContext, dLockInfo,
@@ -1082,20 +1082,20 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                     || !dLockInfo.isCompatible(datasetLockMode)) {
 
                 if (ALLOW_DATASET_GRANULE_X_LOCK_WITH_OTHER_CONCURRENT_LOCK_REQUESTS) {
-                    //The following case only may occur when the dataset level X lock is requested 
+                    //The following case only may occur when the dataset level X lock is requested
                     //with the other lock
 
                     //[Notice]
                     //There has been no same caller as (jId, dId, entityHashValue) triplet.
                     //But there could be the same caller in terms of (jId, dId) pair.
-                    //For example, 
+                    //For example,
                     //1) (J1, D1, E1) acquires IS in Dataset D1
                     //2) (J2, D1, -1) requests X  in Dataset D1, but waits
-                    //3) (J1, D1, E2) requests IS in Dataset D1, but should wait 
+                    //3) (J1, D1, E2) requests IS in Dataset D1, but should wait
                     //The 3) may cause deadlock if 1) and 3) are under the same thread.
                     //Even if (J1, D1, E1) and (J1, D1, E2) are two different thread, instead of
                     //aborting (J1, D1, E1) triggered by the deadlock, we give higher priority to 3) than 2)
-                    //as long as the dataset level lock D1 is being held by the same jobId. 
+                    //as long as the dataset level lock D1 is being held by the same jobId.
                     //The above consideration is covered in the following code.
                     //find the same dataset-granule lock request, that is, (J1, D1) pair in the above example.
                     if (jobInfo != null && jobInfo.isDatasetLockGranted(dId, LockMode.IS)) {
@@ -1110,7 +1110,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
             }
         } else {
             isUpgrade = isLockUpgrade(entityInfoManager.getDatasetLockMode(entityInfo), lockMode);
-            if (isUpgrade) { //upgrade call 
+            if (isUpgrade) { //upgrade call
                 //return fail if any upgrader exists or upgrading lock mode is not compatible
                 if (dLockInfo.getFirstUpgrader() != -1 || !dLockInfo.isUpgradeCompatible(datasetLockMode, entityInfo)) {
                     return false;
@@ -1230,7 +1230,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                 }
             }
 
-            //#. if the datasetLockInfo doesn't exist in datasetResourceHT 
+            //#. if the datasetLockInfo doesn't exist in datasetResourceHT
             if (dLockInfo == null || dLockInfo.isNoHolder()) {
                 if (dLockInfo == null) {
                     dLockInfo = new DatasetLockInfo(entityLockInfoManager, entityInfoManager, lockWaiterManager);
@@ -1265,7 +1265,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                         jobInfo.increaseDatasetISLockCount(dId);
                         if (doEscalate) {
                             //This exception is thrown when the threshold value is set to 1.
-                            //We don't want to allow the lock escalation when there is a first lock request on a dataset. 
+                            //We don't want to allow the lock escalation when there is a first lock request on a dataset.
                             throw new IllegalStateException(
                                     "ESCALATE_TRHESHOLD_ENTITY_TO_DATASET should not be set to "
                                             + txnSubsystem.getTransactionProperties()
@@ -1514,20 +1514,20 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
                     || !dLockInfo.isCompatible(datasetLockMode)) {
 
                 if (ALLOW_DATASET_GRANULE_X_LOCK_WITH_OTHER_CONCURRENT_LOCK_REQUESTS) {
-                    //The following case only may occur when the dataset level X lock is requested 
+                    //The following case only may occur when the dataset level X lock is requested
                     //with the other lock
 
                     //[Notice]
                     //There has been no same caller as (jId, dId, entityHashValue) triplet.
                     //But there could be the same caller in terms of (jId, dId) pair.
-                    //For example, 
+                    //For example,
                     //1) (J1, D1, E1) acquires IS in Dataset D1
                     //2) (J2, D1, -1) requests X  in Dataset D1, but waits
-                    //3) (J1, D1, E2) requests IS in Dataset D1, but should wait 
+                    //3) (J1, D1, E2) requests IS in Dataset D1, but should wait
                     //The 3) may cause deadlock if 1) and 3) are under the same thread.
                     //Even if (J1, D1, E1) and (J1, D1, E2) are two different thread, instead of
                     //aborting (J1, D1, E1) triggered by the deadlock, we give higher priority to 3) than 2)
-                    //as long as the dataset level lock D1 is being held by the same jobId. 
+                    //as long as the dataset level lock D1 is being held by the same jobId.
                     //The above consideration is covered in the following code.
                     //find the same dataset-granule lock request, that is, (J1, D1) pair in the above example.
                     if (jobInfo.isDatasetLockGranted(dId, LockMode.IS)) {
@@ -1580,7 +1580,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
 
         } else {
             isUpgrade = isLockUpgrade(entityInfoManager.getDatasetLockMode(entityInfo), lockMode);
-            if (isUpgrade) { //upgrade call 
+            if (isUpgrade) { //upgrade call
                 //return fail if any upgrader exists or upgrading lock mode is not compatible
                 if (dLockInfo.getFirstUpgrader() != -1 || !dLockInfo.isUpgradeCompatible(datasetLockMode, entityInfo)) {
                     return -2;
@@ -1860,7 +1860,7 @@ public class LockManager implements ILockManager, ILifeCycleComponent {
 
     /**
      * For now, upgrading lock granule from entity-granule to dataset-granule is not supported!!
-     * 
+     *
      * @param fromLockMode
      * @param toLockMode
      * @return
@@ -2286,4 +2286,4 @@ class ConsecutiveWakeupContext {
 
     }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java
index 1dbf16b..7ccd6b9 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java
@@ -516,14 +516,14 @@ class LockRequestWorker implements Runnable {
     public void log(String s) {
         System.out.println(s);
     }
-    
+
     public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("{ t : \"").append(threadName).append("\", r : ");
         if (lockRequest == null) {
             sb.append("null");
         } else {
-            sb.append("\"").append(lockRequest.toString()).append("\""); 
+            sb.append("\"").append(lockRequest.toString()).append("\"");
         }
         sb.append(" }");
         return sb.toString();

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerStats.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerStats.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerStats.java
index 7a4203f..1050d54 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerStats.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockManagerStats.java
@@ -25,7 +25,7 @@ import java.util.logging.Logger;
 
 final class LockManagerStats {
     private final int loggingPeriod;
-    
+
     private final AtomicLong lCnt = new AtomicLong();
     private final AtomicLong ilCnt = new AtomicLong();
     private final AtomicLong tlCnt = new AtomicLong();
@@ -36,16 +36,16 @@ final class LockManagerStats {
     LockManagerStats(int loggingPeriod) {
         this.loggingPeriod = loggingPeriod;
     }
-    
+
     final void lock()           { lCnt.incrementAndGet(); }
     final void instantLock()    { ilCnt.incrementAndGet(); }
     final void tryLock()        { tlCnt.incrementAndGet(); }
     final void instantTryLock() { itlCnt.incrementAndGet(); }
     final void unlock()         { ulCnt.incrementAndGet(); }
     final void releaseLocks()   { rlCnt.incrementAndGet(); }
-    
+
     final int requestSum() {
-        return lCnt.intValue() + ilCnt.intValue() + tlCnt.intValue() 
+        return lCnt.intValue() + ilCnt.intValue() + tlCnt.intValue()
                 + itlCnt.intValue() + ulCnt.intValue() + rlCnt.intValue();
     }
 
@@ -59,7 +59,7 @@ final class LockManagerStats {
         .append(", releaseLocks : ").append(rlCnt)
         .append(" }");
         return sb;
-    }        
+    }
 
     @Override
     public String toString() {
@@ -67,7 +67,7 @@ final class LockManagerStats {
     }
 
     final void logCounters(final Logger logger, final Level lvl, boolean always) {
-        if (logger.isLoggable(lvl) 
+        if (logger.isLoggable(lvl)
             && (always || requestSum()  % loggingPeriod == 0)) {
             logger.log(lvl, toString());
         }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockWaiterManager.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockWaiterManager.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockWaiterManager.java
index a06fbd1..ae971fb 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockWaiterManager.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/LockWaiterManager.java
@@ -192,7 +192,7 @@ public class LockWaiterManager {
      * pArray status : O O x x x x x
      * However, in the above case, if we subtract the deinitialized children's slots,
      * needShrink() will return false even if we shrink the pArray at this case.
-     * 
+     *
      * @return
      */
     private boolean needShrink() {
@@ -308,7 +308,7 @@ public class LockWaiterManager {
 
 class ChildLockWaiterArrayManager {
     public static final int NUM_OF_SLOTS = 100; //number of LockWaiter objects in 'childArray'.
-    //    public static final int NUM_OF_SLOTS = 10; //for unit test 
+    //    public static final int NUM_OF_SLOTS = 10; //for unit test
 
     private int freeSlotNum;
     private int occupiedSlots; //-1 represents 'deinitialized' state.
@@ -400,4 +400,4 @@ class ChildLockWaiterArrayManager {
         }
         return sb.toString();
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/PrimitiveIntHashMap.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/PrimitiveIntHashMap.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/PrimitiveIntHashMap.java
index afa688c..5bf5ad6 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/PrimitiveIntHashMap.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/locking/PrimitiveIntHashMap.java
@@ -59,26 +59,26 @@ public class PrimitiveIntHashMap {
     //        int val[] = new int[500];
     //        KeyValuePair pair;
     //        PrimitiveIntHashMap map = new PrimitiveIntHashMap(1<<4, 1<<3, 5);
-    //        
+    //
     //        for (j=0; j < num; j++) {
-    //            
+    //
     //            k += 100;
     //            //generate data
     //            for (i=0; i < k; i++) {
     //                key[i] = i;
     //                val[i] = i;
     //            }
-    //            
+    //
     //            //put data to map
     //            for (i=0; i < k-30; i++) {
     //                map.put(key[i], val[i]);
     //            }
-    //            
+    //
     //            //put data to map
     //            for (i=0; i < k-30; i++) {
     //                map.put(key[i], val[i]);
     //            }
-    //            
+    //
     //            map.beginIterate();
     //            pair = map.getNextKeyValue();
     //            i = 0;
@@ -87,17 +87,17 @@ public class PrimitiveIntHashMap {
     //                System.out.println("["+i+"] key:"+ pair.key + ", val:"+ pair.value);
     //                pair = map.getNextKeyValue();
     //            }
-    //            
+    //
     //            //System.out.println(map.prettyPrint());
-    //            
+    //
     //            for (i=k-20; i< k; i++) { //skip X70~X79
     //                map.put(key[i], val[i]);
     //            }
-    //            
+    //
     //            System.out.println(map.prettyPrint());
-    //            
+    //
     //            //remove data to map
-    //            for (i=0; i < k-10; i++) { 
+    //            for (i=0; i < k-10; i++) {
     //                map.remove(key[i]);
     //                try {
     //                    Thread.currentThread().sleep(1);
@@ -105,7 +105,7 @@ public class PrimitiveIntHashMap {
     //                    e.printStackTrace();
     //                }
     //            }
-    //            
+    //
     //            map.beginIterate();
     //            pair = map.getNextKeyValue();
     //            i = 0;
@@ -114,9 +114,9 @@ public class PrimitiveIntHashMap {
     //                System.out.println("["+i+"] key:"+ pair.key + ", val:"+ pair.value);
     //                pair = map.getNextKeyValue();
     //            }
-    //            
+    //
     //            //remove data to map
-    //            for (i=0; i < k-10; i++) { 
+    //            for (i=0; i < k-10; i++) {
     //                map.remove(key[i]);
     //                try {
     //                    Thread.currentThread().sleep(1);
@@ -125,15 +125,15 @@ public class PrimitiveIntHashMap {
     //                    e.printStackTrace();
     //                }
     //            }
-    //            
+    //
     //            System.out.println(map.prettyPrint());
-    //            
+    //
     //            //get data from map
     //            for (i=0; i < k; i++) {
-    //                System.out.println(""+i+"=> key:"+ key[i] + ", val:"+val[i] +", result: " + map.get(key[i]));  
+    //                System.out.println(""+i+"=> key:"+ key[i] + ", val:"+val[i] +", result: " + map.get(key[i]));
     //            }
     //        }
-    //        
+    //
     //        map.beginIterate();
     //        pair = map.getNextKeyValue();
     //        i = 0;
@@ -259,7 +259,7 @@ public class PrimitiveIntHashMap {
                         //Notice! To avoid bucket iteration, child.remove() is not used.
                         child.cArray[j][k * 2] = -1;
                         child.cArray[j][0]--;
-                        //re-hash it 
+                        //re-hash it
                         pArray.get(hash(key) / CHILD_BUCKETS).put(hash(key) % CHILD_BUCKETS, key, value, false);
                     }
                 }
@@ -289,7 +289,7 @@ public class PrimitiveIntHashMap {
     /**
      * Shrink policy:
      * Shrink when the resource under-utilization lasts for a certain amount of time.
-     * 
+     *
      * @return
      */
     private boolean needShrink() {
@@ -319,8 +319,8 @@ public class PrimitiveIntHashMap {
     private boolean isSafeToShrink() {
         int i, j;
         int size = pArray.size();
-        //Child: 0, 1, 2, 3, 4, 5, 6, 7 
-        //[HChild(Head Child):0 and TChild(Tail Child): 4], [1(H),5(T)], [2(H),6(T)] and so on. 
+        //Child: 0, 1, 2, 3, 4, 5, 6, 7
+        //[HChild(Head Child):0 and TChild(Tail Child): 4], [1(H),5(T)], [2(H),6(T)] and so on.
         //When the map shrinks, the sum of occupied slots in H/TChild should not exceed the NUM_OF_SLOTS-1.
         //Then it is safe to shrink. Otherwise, unsafe.
         ChildIntArrayManager HChild, TChild;
@@ -514,7 +514,7 @@ class ChildIntArrayManager {
      * Update value if the key exists and if isUpsert is true
      * No need to call get() to check the existence of the key before calling put().
      * Notice! Caller should make sure that there is an available slot.
-     * 
+     *
      * @param bucketNum
      * @param key
      * @param value
@@ -570,7 +570,7 @@ class ChildIntArrayManager {
 
     /**
      * remove key if it exists. Otherwise, ignore it.
-     * 
+     *
      * @param bucketNum
      * @param key
      * @return 1 for success, 0 if the key doesn't exist

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointObject.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointObject.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointObject.java
index 82f4609..3356298 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointObject.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointObject.java
@@ -29,7 +29,7 @@ public class CheckpointObject implements Serializable, Comparable<CheckpointObje
     private final int maxJobId;
     private final long timeStamp;
     private final boolean sharp;
-    
+
     public CheckpointObject(long checkpointLsn, long minMCTFirstLsn, int maxJobId, long timeStamp, boolean sharp) {
         this.checkpointLsn = checkpointLsn;
         this.minMCTFirstLsn = minMCTFirstLsn;
@@ -57,7 +57,7 @@ public class CheckpointObject implements Serializable, Comparable<CheckpointObje
     public boolean isSharp() {
         return sharp;
     }
-    
+
     @Override
     public int compareTo(CheckpointObject checkpointObject) {
         long compareTimeStamp = checkpointObject.getTimeStamp();

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointThread.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointThread.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointThread.java
index 0dfe5f5..c3cf3e0 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointThread.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/CheckpointThread.java
@@ -42,7 +42,7 @@ public class CheckpointThread extends Thread {
 
     @Override
     public void run() {
-        
+
         Thread.currentThread().setName("Checkpoint Thread");
 
         long currentCheckpointAttemptMinLSN = -1;
@@ -55,21 +55,21 @@ public class CheckpointThread extends Thread {
             } catch (InterruptedException e) {
                 //ignore
             }
-            
-            
+
+
             if(lastCheckpointLSN == -1)
             {
                 try {
                     //Since the system just started up after sharp checkpoint, last checkpoint LSN is considered as the min LSN of the current log partition
                     lastCheckpointLSN = logManager.getReadableSmallestLSN();
                 } catch (Exception e) {
-                    lastCheckpointLSN = 0; 
+                    lastCheckpointLSN = 0;
                 }
             }
-            
+
             //1. get current log LSN
             currentLogLSN = logManager.getAppendLSN();
-            
+
             //2. if current log LSN - previous checkpoint > threshold, do checkpoint
             if (currentLogLSN - lastCheckpointLSN > lsnThreshold) {
                 try {
@@ -77,16 +77,16 @@ public class CheckpointThread extends Thread {
                     //1. get minimum first LSN (MFL) from open indexes.
                     //2. if current MinFirstLSN < targetCheckpointLSN, schedule async flush for any open index witch has first LSN < force flush delta
                     //3. next time checkpoint comes, it will be able to remove log files which have end range less than current targetCheckpointLSN
-                   
+
                     targetCheckpointLSN = lastCheckpointLSN + lsnThreshold;
                     currentCheckpointAttemptMinLSN = recoveryMgr.checkpoint(false, targetCheckpointLSN);
-                    
+
                     //checkpoint was completed at target LSN or above
                     if(currentCheckpointAttemptMinLSN >= targetCheckpointLSN)
                     {
-                        lastCheckpointLSN = currentCheckpointAttemptMinLSN; 
+                        lastCheckpointLSN = currentCheckpointAttemptMinLSN;
                     }
-                    
+
                 } catch (ACIDException | HyracksDataException e) {
                     throw new Error("failed to checkpoint", e);
                 }
@@ -94,4 +94,4 @@ public class CheckpointThread extends Thread {
         }
     }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java
index 8fe75f2..2f824df 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java
@@ -163,7 +163,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
                         LOGGER.info("[Warning] ---------------------------------------------------");
                         LOGGER.info("[Warning] Some(or all) of transaction log files are lost.");
                         LOGGER.info("[Warning] ---------------------------------------------------");
-                        //No choice but continuing when the log files are lost. 
+                        //No choice but continuing when the log files are lost.
                     }
                 }
                 state = SystemState.HEALTHY;
@@ -210,7 +210,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
 
         //-------------------------------------------------------------------------
         //  [ analysis phase ]
-        //  - collect all committed Lsn 
+        //  - collect all committed Lsn
         //-------------------------------------------------------------------------
         LOGGER.log(Level.INFO, "[RecoveryMgr] in analysis phase");
 
@@ -431,7 +431,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
 
         //-------------------------------------------------------------------------
         //  [ analysis phase ]
-        //  - collect all committed Lsn 
+        //  - collect all committed Lsn
         //-------------------------------------------------------------------------
         if (LOGGER.isLoggable(Level.INFO)) {
             LOGGER.info("[RecoveryMgr] in analysis phase");
@@ -499,7 +499,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
         Map<Long, Long> resourceId2MaxLSNMap = new HashMap<Long, Long>();
         boolean foundWinner = false;
 
-        //#. get indexLifeCycleManager 
+        //#. get indexLifeCycleManager
         IAsterixAppRuntimeContextProvider appRuntimeContext = txnSubsystem.getAsterixAppRuntimeContextProvider();
         IDatasetLifecycleManager datasetLifecycleManager = appRuntimeContext.getDatasetLifecycleManager();
         PersistentLocalResourceRepository localResourceRepository = (PersistentLocalResourceRepository) appRuntimeContext
@@ -625,7 +625,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
         TransactionManager txnMgr = (TransactionManager) txnSubsystem.getTransactionManager();
         String logDir = logMgr.getLogManagerProperties().getLogDir();
 
-        //get the filename of the previous checkpoint files which are about to be deleted 
+        //get the filename of the previous checkpoint files which are about to be deleted
         //right after the new checkpoint file is written.
         File[] prevCheckpointFiles = getPreviousCheckpointFiles();
 
@@ -650,7 +650,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
                         minMCTFirstLSN = remoteResourcesManager.getMinRemoteLSN(deadReplicaIds);
                     }
                 } else {
-                    //start up complete checkpoint. Avoid deleting remote recovery logs. 
+                    //start up complete checkpoint. Avoid deleting remote recovery logs.
                     minMCTFirstLSN = getMinFirstLSN();
                 }
             }
@@ -900,7 +900,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
 
     /**
      * Rollback a transaction
-     * 
+     *
      * @see org.apache.transaction.management.service.recovery.IRecoveryManager# rollbackTransaction (org.apache.TransactionContext.management.service.transaction .TransactionContext)
      */
     @Override
@@ -997,7 +997,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
 
             IDatasetLifecycleManager datasetLifecycleManager = txnSubsystem.getAsterixAppRuntimeContextProvider()
                     .getDatasetLifecycleManager();
-            //TODO sort loser entities by smallest LSN to undo in one pass. 
+            //TODO sort loser entities by smallest LSN to undo in one pass.
             Iterator<Entry<TxnId, List<Long>>> iter = jobLoserEntity2LSNsMap.entrySet().iterator();
             int undoCount = 0;
             while (iter.hasNext()) {
@@ -1406,7 +1406,7 @@ public class RecoveryManager implements IRecoveryManager, ILifeCycleComponent {
             ArrayList<File> candidiatePartitions = new ArrayList<File>();
             for (File partition : jobEntitCommitOnDiskPartitionsFiles) {
                 String partitionName = partition.getName();
-                //entity commit log must come after the update log, therefore, consider only partitions with max LSN > logLSN 
+                //entity commit log must come after the update log, therefore, consider only partitions with max LSN > logLSN
                 if (getPartitionMaxLSNFromName(partitionName) > logLSN) {
                     candidiatePartitions.add(partition);
                 }
@@ -1637,4 +1637,4 @@ class TxnId {
         }
         return size;
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManagementConstants.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManagementConstants.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManagementConstants.java
index 4600561..5df230b 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManagementConstants.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManagementConstants.java
@@ -41,16 +41,16 @@ public class TransactionManagementConstants {
             public static final byte IX  =  2;
             public static final byte S   =  3;
             public static final byte X   =  4;
-            
+
             public static byte intentionMode(byte mode) {
                 switch (mode) {
                     case S:  return IS;
                     case X:  return IX;
                     default: throw new IllegalArgumentException(
                             "no intention lock mode for " + toString(mode));
-                }                
+                }
             }
-            
+
             public static String toString(byte mode) {
                 switch (mode) {
                     case ANY: return "ANY";

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/e2439b44/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManager.java
----------------------------------------------------------------------
diff --git a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManager.java b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManager.java
index 7eddb0d..57ced9c 100644
--- a/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManager.java
+++ b/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/TransactionManager.java
@@ -103,7 +103,7 @@ public class TransactionManager implements ITransactionManager, ILifeCycleCompon
 
     @Override
     public void commitTransaction(ITransactionContext txnCtx, DatasetId datasetId, int PKHashVal) throws ACIDException {
-        //Only job-level commits call this method. 
+        //Only job-level commits call this method.
         try {
             if (txnCtx.isWriteTxn()) {
                 LogRecord logRecord = ((TransactionContext) txnCtx).getLogRecord();



Mime
View raw message