Repository: carbondata Updated Branches: refs/heads/master 2ee777551 -> 500654e60
http://git-wip-us.apache.org/repos/asf/carbondata/blob/500654e6/dev/findbugs-exclude.xml ---------------------------------------------------------------------- diff --git a/dev/findbugs-exclude.xml b/dev/findbugs-exclude.xml index ccb8a1a..1520cd4 100644 --- a/dev/findbugs-exclude.xml +++ b/dev/findbugs-exclude.xml @@ -27,50 +27,33 @@ <!-- This method creates stream but the caller methods are responsible for closing the stream --> <Match> <Class name="org.apache.carbondata.core.datastore.impl.FileFactory"/> - <Or> - <Method name="getDataInputStream"/> - </Or> + <Method name="getDataInputStream"/> <Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE"/> </Match> - <Match> - <Class name="org.apache.carbondata.core.scan.aggregator.impl.BitSet"/> - <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED"/> + <Class name="org.apache.carbondata.core.datastore.impl.FileHolderImpl"/> + <Method name="getDataInputStream"/> + <Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE"/> </Match> - <Match> - <Class name="org.apache.carbondata.core.scan.expression.ExpressionResult"/> - <Or> - <Method name="getBoolean"/> - </Or> - <Bug pattern="NP_BOOLEAN_RETURN_NULL"/> + <Class name="org.apache.carbondata.core.constants.CarbonCommonConstants"/> + <Bug pattern="MS_MUTABLE_ARRAY"/> </Match> - <Match> - <Class name="org.apache.carbondata.processing.csvreaderstep.BlockDataHandler"/> - <Or> - <Method name="readOneRow"/> - </Or> - <Bug pattern="NP_GUARANTEED_DEREF"/> + <Class name="org.apache.carbondata.core.scan.expression.ExpressionResult"/> + <Method name="getBoolean"/> + <Bug pattern="NP_BOOLEAN_RETURN_NULL"/> </Match> - <Match> - <!-- - A mutable static field could be changed by malicious code or by accident. The field could be - made package protected to avoid this vulnerability. - - We have a set of stuff like: - public static final byte [] SKIP_ARRAY = new byte [ ] {'S', 'K', 'I', 'P'}; - - Warning is not wrong, but difficult to avoid... - !--> - <Bug pattern="MS_PKGPROTECT"/> + <Class name="org.apache.carbondata.core.metadata.schema.table.column.CarbonImplicitDimension"/> + <Method name="equals"/> + <Bug pattern="EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC"/> </Match> <Match> - <Bug pattern="MS_OOI_PKGPROTECT"/> + <Class name="org.apache.carbondata.core.statusmanager.LoadMetadataDetails"/> + <Method name="getTimeStamp"/> + <Bug pattern="STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE"/> </Match> - - <Match> <!-- Returning a reference to a mutable object value stored in one of the object's fields exposes @@ -87,8 +70,6 @@ <Match> <Bug pattern="EI_EXPOSE_REP2"/> </Match> - - <Match> <!-- This class implements the Comparator interface. You should consider whether or not it should @@ -99,81 +80,22 @@ !--> <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE"/> </Match> - - <Match> - - <!-- - This method performs synchronization an object that is an instance of a class from - the java.util.concurrent package (or its subclasses). Instances of these classes have their own - concurrency control mechanisms that are orthogonal to the synchronization provided by the Java - keyword synchronized. For example, synchronizing on an AtomicBoolean will not prevent other - threads from modifying the AtomicBoolean. - - Such code may be correct, but should be carefully reviewed and documented, and may confuse people - who have to maintain the code at a later date. - - We do that all the time to save lock objects. - !--> - <Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER"/> - </Match> - - <Match> - <!-- - Found a call to a method which will perform a byte to String (or String to byte) conversion, - and will assume that the default platform encoding is suitable. This will cause the - application behaviour to vary between platforms. Use an alternative API and specify a - charset name or Charset object explicitly. - !--> - <Bug pattern="DM_DEFAULT_ENCODING"/> - </Match> - <Match> - <!-- - Invoking System.exit shuts down the entire Java virtual machine. This should only been - done when it is appropriate. Such calls make it hard or impossible for your code to be - invoked by other code. Consider throwing a RuntimeException instead. - - It's so bad that the reviews will catch all the wrong cases. - !--> - <Bug pattern="DM_EXIT"/> + <Class name="org.apache.carbondata.core.scan.aggregator.impl.BitSet"/> + <Or> + <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED"/> + </Or> </Match> - <Match> - <!-- - This method returns a value that is not checked. The return value should be checked since - it can indicate an unusual or unexpected function execution. For example, the - File.delete() method returns false if the file could not be successfully deleted - (rather than throwing an Exception). If you don't check the result, you won't notice - if the method invocation signals unexpected behavior by returning an atypical return - value. - - It's so bad that the reviews will catch all the wrong cases. - !--> - <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/> + <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/> </Match> <Match> - <Bug pattern="RV_RETURN_VALUE_IGNORED_INFERRED"/> + <Bug pattern="DP_DO_INSIDE_DO_PRIVILEGED"/> </Match> - - <Match> - <!-- - This method contains a redundant check of a known non-null value against the constant null. - - Most of the time we're securing ourselves, does no much harm. - !--> - <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/> + <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/> </Match> - <Match> - <!-- - A final static field references an array and can be accessed by malicious code or by - accident from another package. This code can freely modify the contents of the array. - - We've got this all over the place... Cloning the array by security is not a general - solution from a performance point of view - !--> - <Bug pattern="MS_MUTABLE_ARRAY"/> + <Bug pattern="JLM_JSR166_UTILCONCURRENT_MONITORENTER"/> </Match> - </FindBugsFilter> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/carbondata/blob/500654e6/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index c8eec62..f722c66 100644 --- a/pom.xml +++ b/pom.xml @@ -421,7 +421,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> - <version>3.0.0</version> + <version>3.0.4</version> <configuration> <excludeFilterFile>${dev.path}/findbugs-exclude.xml</excludeFilterFile> <failOnError>true</failOnError> http://git-wip-us.apache.org/repos/asf/carbondata/blob/500654e6/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeCarbonRowPage.java ---------------------------------------------------------------------- diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeCarbonRowPage.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeCarbonRowPage.java index 367d8a0..20b60c9 100644 --- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeCarbonRowPage.java +++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeCarbonRowPage.java @@ -96,15 +96,15 @@ public class UnsafeCarbonRowPage { for (; dimCount < noDictionaryDimensionMapping.length; dimCount++) { if (noDictionaryDimensionMapping[dimCount]) { byte[] col = (byte[]) row[dimCount]; - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .putShort(baseObject, address + size, (short) col.length); size += 2; - CarbonUnsafe.unsafe.copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, + CarbonUnsafe.getUnsafe().copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, address + size, col.length); size += col.length; } else { int value = (int) row[dimCount]; - CarbonUnsafe.unsafe.putInt(baseObject, address + size, value); + CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, value); size += 4; } } @@ -112,9 +112,9 @@ public class UnsafeCarbonRowPage { // write complex dimensions here. for (; dimCount < dimensionSize; dimCount++) { byte[] col = (byte[]) row[dimCount]; - CarbonUnsafe.unsafe.putShort(baseObject, address + size, (short) col.length); + CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, (short) col.length); size += 2; - CarbonUnsafe.unsafe.copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, + CarbonUnsafe.getUnsafe().copyMemory(col, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, address + size, col.length); size += col.length; } @@ -128,31 +128,31 @@ public class UnsafeCarbonRowPage { switch (measureDataType[mesCount]) { case SHORT: Short sval = (Short) value; - CarbonUnsafe.unsafe.putShort(baseObject, address + size, sval); + CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, sval); size += 2; break; case INT: Integer ival = (Integer) value; - CarbonUnsafe.unsafe.putInt(baseObject, address + size, ival); + CarbonUnsafe.getUnsafe().putInt(baseObject, address + size, ival); size += 4; break; case LONG: Long val = (Long) value; - CarbonUnsafe.unsafe.putLong(baseObject, address + size, val); + CarbonUnsafe.getUnsafe().putLong(baseObject, address + size, val); size += 8; break; case DOUBLE: Double doubleVal = (Double) value; - CarbonUnsafe.unsafe.putDouble(baseObject, address + size, doubleVal); + CarbonUnsafe.getUnsafe().putDouble(baseObject, address + size, doubleVal); size += 8; break; case DECIMAL: BigDecimal decimalVal = (BigDecimal) value; byte[] bigDecimalInBytes = DataTypeUtil.bigDecimalToByte(decimalVal); - CarbonUnsafe.unsafe.putShort(baseObject, address + size, + CarbonUnsafe.getUnsafe().putShort(baseObject, address + size, (short) bigDecimalInBytes.length); size += 2; - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(bigDecimalInBytes, CarbonUnsafe.BYTE_ARRAY_OFFSET, baseObject, address + size, bigDecimalInBytes.length); size += bigDecimalInBytes.length; @@ -163,7 +163,7 @@ public class UnsafeCarbonRowPage { unset(nullSetWords, mesCount); } } - CarbonUnsafe.unsafe.copyMemory(nullSetWords, CarbonUnsafe.LONG_ARRAY_OFFSET, baseObject, + CarbonUnsafe.getUnsafe().copyMemory(nullSetWords, CarbonUnsafe.LONG_ARRAY_OFFSET, baseObject, address + nullWordLoc, nullSetSize); return size; } @@ -175,16 +175,16 @@ public class UnsafeCarbonRowPage { Object baseObject = dataBlock.getBaseObject(); for (; dimCount < noDictionaryDimensionMapping.length; dimCount++) { if (noDictionaryDimensionMapping[dimCount]) { - short aShort = CarbonUnsafe.unsafe.getShort(baseObject, address + size); + short aShort = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); byte[] col = new byte[aShort]; size += 2; - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(baseObject, address + size, col, CarbonUnsafe.BYTE_ARRAY_OFFSET, col.length); size += col.length; rowToFill[dimCount] = col; } else { - int anInt = CarbonUnsafe.unsafe.getInt(baseObject, address + size); + int anInt = CarbonUnsafe.getUnsafe().getInt(baseObject, address + size); size += 4; rowToFill[dimCount] = anInt; } @@ -192,10 +192,10 @@ public class UnsafeCarbonRowPage { // write complex dimensions here. for (; dimCount < dimensionSize; dimCount++) { - short aShort = CarbonUnsafe.unsafe.getShort(baseObject, address + size); + short aShort = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); byte[] col = new byte[aShort]; size += 2; - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(baseObject, address + size, col, CarbonUnsafe.BYTE_ARRAY_OFFSET, col.length); size += col.length; rowToFill[dimCount] = col; @@ -203,7 +203,7 @@ public class UnsafeCarbonRowPage { int nullSetSize = nullSetWords.length * 8; Arrays.fill(nullSetWords, 0); - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(baseObject, address + size, nullSetWords, CarbonUnsafe.LONG_ARRAY_OFFSET, nullSetSize); size += nullSetSize; @@ -212,30 +212,30 @@ public class UnsafeCarbonRowPage { if (isSet(nullSetWords, mesCount)) { switch (measureDataType[mesCount]) { case SHORT: - Short sval = CarbonUnsafe.unsafe.getShort(baseObject, address + size); + Short sval = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); size += 2; rowToFill[dimensionSize + mesCount] = sval; break; case INT: - Integer ival = CarbonUnsafe.unsafe.getInt(baseObject, address + size); + Integer ival = CarbonUnsafe.getUnsafe().getInt(baseObject, address + size); size += 4; rowToFill[dimensionSize + mesCount] = ival; break; case LONG: - Long val = CarbonUnsafe.unsafe.getLong(baseObject, address + size); + Long val = CarbonUnsafe.getUnsafe().getLong(baseObject, address + size); size += 8; rowToFill[dimensionSize + mesCount] = val; break; case DOUBLE: - Double doubleVal = CarbonUnsafe.unsafe.getDouble(baseObject, address + size); + Double doubleVal = CarbonUnsafe.getUnsafe().getDouble(baseObject, address + size); size += 8; rowToFill[dimensionSize + mesCount] = doubleVal; break; case DECIMAL: - short aShort = CarbonUnsafe.unsafe.getShort(baseObject, address + size); + short aShort = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); byte[] bigDecimalInBytes = new byte[aShort]; size += 2; - CarbonUnsafe.unsafe.copyMemory(baseObject, address + size, bigDecimalInBytes, + CarbonUnsafe.getUnsafe().copyMemory(baseObject, address + size, bigDecimalInBytes, CarbonUnsafe.BYTE_ARRAY_OFFSET, bigDecimalInBytes.length); size += bigDecimalInBytes.length; rowToFill[dimensionSize + mesCount] = DataTypeUtil.byteToBigDecimal(bigDecimalInBytes); @@ -255,17 +255,17 @@ public class UnsafeCarbonRowPage { Object baseObject = dataBlock.getBaseObject(); for (; dimCount < noDictionaryDimensionMapping.length; dimCount++) { if (noDictionaryDimensionMapping[dimCount]) { - short aShort = CarbonUnsafe.unsafe.getShort(baseObject, address + size); + short aShort = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); byte[] col = new byte[aShort]; size += 2; - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(baseObject, address + size, col, CarbonUnsafe.BYTE_ARRAY_OFFSET, col.length); size += col.length; stream.writeShort(aShort); stream.write(col); } else { - int anInt = CarbonUnsafe.unsafe.getInt(baseObject, address + size); + int anInt = CarbonUnsafe.getUnsafe().getInt(baseObject, address + size); size += 4; stream.writeInt(anInt); } @@ -273,10 +273,10 @@ public class UnsafeCarbonRowPage { // write complex dimensions here. for (; dimCount < dimensionSize; dimCount++) { - short aShort = CarbonUnsafe.unsafe.getShort(baseObject, address + size); + short aShort = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); byte[] col = new byte[aShort]; size += 2; - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(baseObject, address + size, col, CarbonUnsafe.BYTE_ARRAY_OFFSET, col.length); size += col.length; stream.writeShort(aShort); @@ -285,7 +285,7 @@ public class UnsafeCarbonRowPage { int nullSetSize = nullSetWords.length * 8; Arrays.fill(nullSetWords, 0); - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(baseObject, address + size, nullSetWords, CarbonUnsafe.LONG_ARRAY_OFFSET, nullSetSize); size += nullSetSize; @@ -297,30 +297,30 @@ public class UnsafeCarbonRowPage { if (isSet(nullSetWords, mesCount)) { switch (measureDataType[mesCount]) { case SHORT: - short sval = CarbonUnsafe.unsafe.getShort(baseObject, address + size); + short sval = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); size += 2; stream.writeShort(sval); break; case INT: - int ival = CarbonUnsafe.unsafe.getInt(baseObject, address + size); + int ival = CarbonUnsafe.getUnsafe().getInt(baseObject, address + size); size += 4; stream.writeInt(ival); break; case LONG: - long val = CarbonUnsafe.unsafe.getLong(baseObject, address + size); + long val = CarbonUnsafe.getUnsafe().getLong(baseObject, address + size); size += 8; stream.writeLong(val); break; case DOUBLE: - double doubleVal = CarbonUnsafe.unsafe.getDouble(baseObject, address + size); + double doubleVal = CarbonUnsafe.getUnsafe().getDouble(baseObject, address + size); size += 8; stream.writeDouble(doubleVal); break; case DECIMAL: - short aShort = CarbonUnsafe.unsafe.getShort(baseObject, address + size); + short aShort = CarbonUnsafe.getUnsafe().getShort(baseObject, address + size); byte[] bigDecimalInBytes = new byte[aShort]; size += 2; - CarbonUnsafe.unsafe.copyMemory(baseObject, address + size, bigDecimalInBytes, + CarbonUnsafe.getUnsafe().copyMemory(baseObject, address + size, bigDecimalInBytes, CarbonUnsafe.BYTE_ARRAY_OFFSET, bigDecimalInBytes.length); size += bigDecimalInBytes.length; stream.writeShort(aShort); http://git-wip-us.apache.org/repos/asf/carbondata/blob/500654e6/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeSortDataRows.java ---------------------------------------------------------------------- diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeSortDataRows.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeSortDataRows.java index fd0bec4..d0bb4f6 100644 --- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeSortDataRows.java +++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/UnsafeSortDataRows.java @@ -383,7 +383,7 @@ public class UnsafeSortDataRows { MemoryBlock newMemoryBlock = UnsafeSortMemoryManager.INSTANCE .allocateMemoryLazy(taskId, page.getDataBlock().size()); // copying data from working memory manager to sortmemory manager - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(page.getDataBlock().getBaseObject(), page.getDataBlock().getBaseOffset(), newMemoryBlock.getBaseObject(), newMemoryBlock.getBaseOffset(), page.getDataBlock().size()); http://git-wip-us.apache.org/repos/asf/carbondata/blob/500654e6/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparator.java ---------------------------------------------------------------------- diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparator.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparator.java index 1d60b11..c54dcd6 100644 --- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparator.java +++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparator.java @@ -49,17 +49,17 @@ public class UnsafeRowComparator implements Comparator<UnsafeCarbonRow> { int sizeB = 0; for (boolean isNoDictionary : noDictionarySortColumnMaping) { if (isNoDictionary) { - short aShort1 = CarbonUnsafe.unsafe.getShort(baseObject, rowA + sizeA); + short aShort1 = CarbonUnsafe.getUnsafe().getShort(baseObject, rowA + sizeA); byte[] byteArr1 = new byte[aShort1]; sizeA += 2; - CarbonUnsafe.unsafe.copyMemory(baseObject, rowA + sizeA, byteArr1, + CarbonUnsafe.getUnsafe().copyMemory(baseObject, rowA + sizeA, byteArr1, CarbonUnsafe.BYTE_ARRAY_OFFSET, aShort1); sizeA += aShort1; - short aShort2 = CarbonUnsafe.unsafe.getShort(baseObject, rowB + sizeB); + short aShort2 = CarbonUnsafe.getUnsafe().getShort(baseObject, rowB + sizeB); byte[] byteArr2 = new byte[aShort2]; sizeB += 2; - CarbonUnsafe.unsafe.copyMemory(baseObject, rowB + sizeB, byteArr2, + CarbonUnsafe.getUnsafe().copyMemory(baseObject, rowB + sizeB, byteArr2, CarbonUnsafe.BYTE_ARRAY_OFFSET, aShort2); sizeB += aShort2; @@ -68,9 +68,9 @@ public class UnsafeRowComparator implements Comparator<UnsafeCarbonRow> { return difference; } } else { - int dimFieldA = CarbonUnsafe.unsafe.getInt(baseObject, rowA + sizeA); + int dimFieldA = CarbonUnsafe.getUnsafe().getInt(baseObject, rowA + sizeA); sizeA += 4; - int dimFieldB = CarbonUnsafe.unsafe.getInt(baseObject, rowB + sizeB); + int dimFieldB = CarbonUnsafe.getUnsafe().getInt(baseObject, rowB + sizeB); sizeB += 4; diff = dimFieldA - dimFieldB; if (diff != 0) { @@ -94,18 +94,18 @@ public class UnsafeRowComparator implements Comparator<UnsafeCarbonRow> { int sizeB = 0; for (boolean isNoDictionary : noDictionarySortColumnMaping) { if (isNoDictionary) { - short aShort1 = CarbonUnsafe.unsafe.getShort(baseObjectL, rowA + sizeA); + short aShort1 = CarbonUnsafe.getUnsafe().getShort(baseObjectL, rowA + sizeA); byte[] byteArr1 = new byte[aShort1]; sizeA += 2; - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(baseObjectL, rowA + sizeA, byteArr1, CarbonUnsafe.BYTE_ARRAY_OFFSET, aShort1); sizeA += aShort1; - short aShort2 = CarbonUnsafe.unsafe.getShort(baseObjectR, rowB + sizeB); + short aShort2 = CarbonUnsafe.getUnsafe().getShort(baseObjectR, rowB + sizeB); byte[] byteArr2 = new byte[aShort2]; sizeB += 2; - CarbonUnsafe.unsafe + CarbonUnsafe.getUnsafe() .copyMemory(baseObjectR, rowB + sizeB, byteArr2, CarbonUnsafe.BYTE_ARRAY_OFFSET, aShort2); sizeB += aShort2; @@ -115,9 +115,9 @@ public class UnsafeRowComparator implements Comparator<UnsafeCarbonRow> { return difference; } } else { - int dimFieldA = CarbonUnsafe.unsafe.getInt(baseObjectL, rowA + sizeA); + int dimFieldA = CarbonUnsafe.getUnsafe().getInt(baseObjectL, rowA + sizeA); sizeA += 4; - int dimFieldB = CarbonUnsafe.unsafe.getInt(baseObjectR, rowB + sizeB); + int dimFieldB = CarbonUnsafe.getUnsafe().getInt(baseObjectR, rowB + sizeB); sizeB += 4; diff = dimFieldA - dimFieldB; if (diff != 0) { http://git-wip-us.apache.org/repos/asf/carbondata/blob/500654e6/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparatorForNormalDIms.java ---------------------------------------------------------------------- diff --git a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparatorForNormalDIms.java b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparatorForNormalDIms.java index 4fd245f..53f976f 100644 --- a/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparatorForNormalDIms.java +++ b/processing/src/main/java/org/apache/carbondata/processing/newflow/sort/unsafe/comparator/UnsafeRowComparatorForNormalDIms.java @@ -44,9 +44,9 @@ public class UnsafeRowComparatorForNormalDIms implements Comparator<UnsafeCarbon int sizeA = 0; int sizeB = 0; for (int i = 0; i < numberOfSortColumns; i++) { - int dimFieldA = CarbonUnsafe.unsafe.getInt(baseObject, rowA + sizeA); + int dimFieldA = CarbonUnsafe.getUnsafe().getInt(baseObject, rowA + sizeA); sizeA += 4; - int dimFieldB = CarbonUnsafe.unsafe.getInt(baseObject, rowB + sizeB); + int dimFieldB = CarbonUnsafe.getUnsafe().getInt(baseObject, rowB + sizeB); sizeB += 4; diff = dimFieldA - dimFieldB; if (diff != 0) {
