Repository: spark
Updated Branches:
  refs/heads/branch-2.0 5619f095b -> 6c67d86f2


[SPARK-17586][BUILD] Do not call static member via instance reference

## What changes were proposed in this pull request?

This PR fixes a warning message as below:

```
[WARNING] .../UnsafeInMemorySorter.java:284: warning: [static] static method 
should be qualified by type name, TaskMemoryManager, instead of by an expression
[WARNING]       currentPageNumber = 
memoryManager.decodePageNumber(recordPointer)
```

by referencing the static member via class not instance reference.

## How was this patch tested?

Existing tests should cover this - Jenkins tests.

Author: hyukjinkwon <gurwls...@gmail.com>

Closes #15141 from HyukjinKwon/SPARK-17586.

(cherry picked from commit 7151011b38a841d9d4bc2e453b9a7cfe42f74f8f)
Signed-off-by: Sean Owen <so...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/6c67d86f
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/6c67d86f
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/6c67d86f

Branch: refs/heads/branch-2.0
Commit: 6c67d86f2f0a24764146827ec5c42969194cb11d
Parents: 5619f09
Author: hyukjinkwon <gurwls...@gmail.com>
Authored: Sun Sep 18 19:18:49 2016 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Sun Sep 18 19:18:59 2016 +0100

----------------------------------------------------------------------
 .../spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6c67d86f/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
 
b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
index 9710529..b517371 100644
--- 
a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
+++ 
b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
@@ -258,7 +258,7 @@ public final class UnsafeInMemorySorter {
     public void loadNext() {
       // This pointer points to a 4-byte record length, followed by the 
record's bytes
       final long recordPointer = array.get(offset + position);
-      currentPageNumber = memoryManager.decodePageNumber(recordPointer);
+      currentPageNumber = TaskMemoryManager.decodePageNumber(recordPointer);
       baseObject = memoryManager.getPage(recordPointer);
       baseOffset = memoryManager.getOffsetInPage(recordPointer) + 4;  // Skip 
over record length
       recordLength = Platform.getInt(baseObject, baseOffset - 4);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to