You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2016/12/23 12:15:48 UTC

spark git commit: [SPARK-18963] o.a.s.unsafe.types.UTF8StringSuite.writeToOutputStreamIntArray test

Repository: spark
Updated Branches:
  refs/heads/master 17579bda3 -> 1311448ea


[SPARK-18963] o.a.s.unsafe.types.UTF8StringSuite.writeToOutputStreamIntArray test

fails on big endian. Only change byte order on little endian

## What changes were proposed in this pull request?

Fix test to only change byte order on LE platforms

## How was this patch tested?

Test run on Big Endian and Little Endian platforms

Author: Pete Robbins <ro...@gmail.com>

Closes #16375 from robbinspg/SPARK-18963.


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

Branch: refs/heads/master
Commit: 1311448ea8da38f9998f1ace79968af6e47d0278
Parents: 17579bd
Author: Pete Robbins <ro...@gmail.com>
Authored: Fri Dec 23 12:15:44 2016 +0000
Committer: Sean Owen <so...@cloudera.com>
Committed: Fri Dec 23 12:15:44 2016 +0000

----------------------------------------------------------------------
 .../test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/1311448e/common/unsafe/src/test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java
----------------------------------------------------------------------
diff --git a/common/unsafe/src/test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java b/common/unsafe/src/test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java
index 04f6845..6f6e0ef 100644
--- a/common/unsafe/src/test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java
+++ b/common/unsafe/src/test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java
@@ -591,7 +591,7 @@ public class UTF8StringSuite {
     // verify that writes work on objects that are not byte arrays
     final ByteBuffer buffer = StandardCharsets.UTF_8.encode("\u5927\u5343\u4e16\u754c");
     buffer.position(0);
-    buffer.order(ByteOrder.LITTLE_ENDIAN);
+    buffer.order(ByteOrder.nativeOrder());
 
     final int length = buffer.limit();
     assertEquals(12, length);


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